面对升级rails版本的问题

时间:2015-04-10 06:40:44

标签: ruby-on-rails ruby-on-rails-4

当我运行bundle install时,它会显示:

Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
You have requested:
  rails = 4.2.1

The bundle currently has rails locked at 4.1.0.
Try running `bundle update rails`

然后我跑:bundle update rails 它给出了:

Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    devise (>= 0) ruby depends on
      responders (>= 0) ruby depends on
        railties (< 4.2, >= 3.2) ruby

    rails (= 4.2.1) ruby depends on
      railties (4.2.1)

请帮我解决这个问题。提前谢谢。

1 个答案:

答案 0 :(得分:2)

看起来您使用的是较旧版本的设计 - 您需要更新您的设计版本以使用Rails 4.2(bundle update devise)。一旦设计更新到3.4.x,它就可以使用railties v4.2.1。