Bundler could not find compatible versions for gem “railties” for Rails 4.0.0

血红的双手。 提交于 2019-11-30 04:39:54

Also bundle update only allows you to update one gem at a time, which is hard if you are updating to Rails 4 and a whole lot of gems have to be updated at the same time.

I solved this by deleting the Gemfile.lock and doing bundle install.

This is of course assuming you have no conflicting explicit gem version in your Gemfile to start with. So if this fails, remove version numbers from the Gemfile.

Just remove gem versions (coffee-rails and sass-rails) from Gemfile and run bundle update

You have an outdated version of Devise, use Rails 4 compatible

gem 'devise', '~> 3.0.0.rc'

Also change coffee-rails to

gem 'coffee-rails', '~> 4.0.0'

and try doing

bundle update coffee-rails

Run gem update rails first, then bundle update

You have gems that aren't supported by Rails 4. Comment out all the gems except for Rails 4 and uncomment them one at a time after running bundle install to find the culprits. You might need to undo some of your version locks.

  1. Delete the Gemfile.lock file
  2. refer here for basic gemfile changes
  3. run bundle install

Everything will work fine. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!