ruby on rails: неопределенный метод "version_requirements" при попытке запустить сервер после новой установки - PullRequest
4 голосов
/ 13 марта 2011

Мне недавно пришлось недавно установить ruby ​​на рельсы. Когда я попытался запустить сервер для проекта, над которым я уже работал до этой новой установки, я получил следующую ошибку:

$ ruby script/server
=> Booting WEBrick...
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:107:in `requirement': undefined method `version_requirements' for #<Gem::Dependency:0xb74bf764> (NoMethodError)
    from ./script/../config/../vendor/rails/railties/lib/initializer.rb:292:in `check_gem_dependencies'
    from ./script/../config/../vendor/rails/railties/lib/initializer.rb:292:in `map'
    from ./script/../config/../vendor/rails/railties/lib/initializer.rb:292:in `check_gem_dependencies'
    from ./script/../config/../vendor/rails/railties/lib/initializer.rb:165:in `process'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:112:in `send'
    from ./script/../config/../vendor/rails/railties/lib/initializer.rb:112:in `run'
    from /media/78C0-455B/bidmc/schedule/config/environment.rb:13
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /media/78C0-455B/bidmc/schedule/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
    from /media/78C0-455B/bidmc/schedule/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /media/78C0-455B/bidmc/schedule/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
    from /media/78C0-455B/bidmc/schedule/vendor/rails/railties/lib/commands/servers/webrick.rb:59
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /media/78C0-455B/bidmc/schedule/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
    from /media/78C0-455B/bidmc/schedule/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /media/78C0-455B/bidmc/schedule/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
    from /media/78C0-455B/bidmc/schedule/vendor/rails/railties/lib/commands/server.rb:49
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from script/server:3

У меня есть последние версии ruby, rubygems и rails.

Есть предложения?

Спасибо.

1 Ответ

8 голосов
/ 13 марта 2011

Похоже, вы используете более новую версию rubygems со старой версией rails.

Вот решение: https://gist.github.com/807008

...