Skip to content

@duonoid /gist:807008
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
after gem update 2011-02-01 (most likely: rubygems-update-1.4.2 -> 1.5.0)
$ ./script/server
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:in `requirement': undefined local variable or method `version_requirements' for #<Rails::GemDependency:0xf6e64a78> (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems.rb:254:in `activate'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1204:in `gem'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:73:in `add_load_paths'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `each'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:132:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
from ** config/environment.rb:13
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from ./script/server:3
@tjwallace

Did you find a quick fix for this bug?

@duonoid
Owner

just:

$ gem install rubygems-update -v='1.4.2'
$ gem uninstall rubygems-update -v='1.5.0'
$ update_rubygems

basically, keep the previous version, then run 'update_rubygems' to reinitialize.

seems to have done the trick.

@pachisaez

Thanks! You saved my life.

@sg552

@davidjdavis: Thank you very much! Saved my life too!
( I know this post from this link: http://excid3.com/blog/2011/02/undefined-local-variable-or-method-version_requirements-for-nameerror/)

@mmell

I ran into this problem after I created a gemset in rvm for my Rails 2.3.5 app. davidjdavis' update_rubygems suggestion didn't work for me. I used Bundler to configure the gems on the app and that eliminated the Rails::GemDependency problem.

@nlimbaseeya

This issue can be resolved by editing Rails 'environment.rb' file.
Please visit the link http://www.redmine.org/issues/7516#note-3

@sethfreeman

Thank you. Quite helpful.

@franciscamunhoz

Hi Guys I have the same problem,

script/server

=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in load_missing_constant': uninitialized constant ActiveSupport::Concern (NameError)
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in
const_missing'
from /Library/Ruby/Gems/1.8/gems/breadcrumbs_on_rails-2.0.0/lib/breadcrumbs_on_rails/controller_mixin.rb:20
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require'
from /Library/Ruby/Gems/1.8/gems/breadcrumbs_on_rails-2.0.0/lib/breadcrumbs_on_rails.rb:17
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:208:in load'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:307:in
load_gems'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:307:in each'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:307:in
load_gems'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:164:in process'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
send'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in run'
from /Users/franciscadasilvamunhoz/adlux-network/config/environment.rb:19
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
require'
from script/server:3

Can you please help me to solve this issue?

@anuragsolanki

Thanks a lot. Got this link after 2 long days of battle with this issue and the above commands seem to have done the trick.

@chrisftw

PS. THANK YOU. I had this same problem... glad I only had it for about 1 hour :)

@ramhoj

Thank you!

@JoshSmith

This is continuing to help people, cough me. Thanks.

@scottil

helpful helpful

@jmccaffrey

thanks for this, somehow I was missing the final 'update_rubygems' call, thanks for the post

@davorb

Four years later, it helped me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.