Skip to content

Instantly share code, notes, and snippets.

@duonoid
Created February 2, 2011 00:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save duonoid/807008 to your computer and use it in GitHub Desktop.
Save duonoid/807008 to your computer and use it in GitHub Desktop.
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
Copy link

Did you find a quick fix for this bug?

@duonoid
Copy link
Author

duonoid commented Feb 4, 2011

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
Copy link

Thanks! You saved my life.

@sg552
Copy link

sg552 commented Feb 19, 2011

@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
Copy link

mmell commented Feb 19, 2011

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
Copy link

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

@sethfreeman
Copy link

Thank you. Quite helpful.

@franciscamunhoz
Copy link

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:inconst_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:inrequire'
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:innew_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:ingem_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:inrequire'
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:inrequire'
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:inload_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:inload_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:insend'
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:ingem_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:inrequire'
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:inrequire'
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:inrequire'
from script/server:3

Can you please help me to solve this issue?

@anuragsolanki
Copy link

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
Copy link

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

@ramhoj
Copy link

ramhoj commented Aug 12, 2011

Thank you!

@joshsmith
Copy link

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

@scottil
Copy link

scottil commented Mar 12, 2012

helpful helpful

@jmccaffrey
Copy link

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

@davorb
Copy link

davorb commented Jun 21, 2015

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