更改Gemfile

时间:2016-06-22 09:43:44

标签: ruby-on-rails

当我将Gemfile中的Rails版本从3.2.13更改为4.0.0时,我遇到了问题。这些是我面临的问题:

  abcuser@1234:~/Proj2$ bundle install
        Fetching gem metadata from http://rubygems.org/
        Fetching version metadata from http://rubygems.org/
        Fetching version metadata from http://rubygems.org/
        Fetching dependency metadata from http://rubygems.org/

    You have requested:
      rails = 4.0.0

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

        If you are updating multiple gems in your Gemfile at once,
        try passing them all to `bundle update`

当运行bundle install时:

abcuser@1234:~/Proj2$ bundle update rails
Fetching gem metadata from http://rubygems.org/
Fetching version metadata from http://rubygems.org/
Fetching version metadata from http://rubygems.org/
Fetching dependency metadata from http://rubygems.org/
You have requested:
  eventmachine = 1.0.9.0

The bundle currently has eventmachine locked at 1.0.0.
Try running `bundle update eventmachine`

If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`

如果我运行eventmachine,它会再说:

abcuser@1234:~/Proj2$ bundle update eventmachine
Fetching gem metadata from http://rubygems.org/
Fetching version metadata from http://rubygems.org/
Fetching version metadata from http://rubygems.org/
Fetching dependency metadata from http://rubygems.org/
You have requested:
  rails = 4.0.0

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

If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`

请帮助我,我该如何处理这个问题?

1 个答案:

答案 0 :(得分:1)

尝试删除Gemfile.lock并重新执行bundle update eventmachine