Project

General

Profile

script/about fails with "uninitialized constant Rails::Info (NameError)"

Added by Brian Coughlin over 16 years ago

All,

I have a developmental version of redmine working with lots of test accounts/files/issues/etc (AFAICT) on Ubuntu 8.04, with Rails 2.0.2, etc.

But I'd like for the script/about command to work for me for lots of good reasons just to be proper.

Here's what I get:

lin@frink-002:/opt/redmine$ RAILS_ENV=production script/about
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitialized constant Rails::Info (NameError)
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/about.rb:2
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from script/about:3

Any advice or ideas?

Thanks

- Brian


Replies (5)

RE: script/about fails with "uninitialized constant Rails::Info (NameError)" - Added by Thomas Lecavelier over 16 years ago

Could you run

rail --version
to ensure there's not a conflict in versions, please?

RE: script/about fails with "uninitialized constant Rails::Info (NameError)" - Added by Daniel Dixon over 16 years ago

I got that error to go away by upgrading my ruby gems and then rails:

sudo gem update --system

Now try running "gem -v". If you get an error, then you also have to fix a bug in ruby gems:
http://www.nickpeters.net/2007/12/31/fix-for-uninitialized-constant-gemgemrunner-nameerror/#comment-11878

Now upgrade Rails:

sudo gem install rails

Hopefully this helps. I wasted many hours of my life on this error :)

RE: script/about fails with "uninitialized constant Rails::Info (NameError)" - Added by Brian Coughlin over 16 years ago

Thanks all for the ideas, but I still get the same error.

I believe I may be stuck in the Romulan neutral zone between apt-get and gem. So I'm in the process of apt-get remove-ing things and backfilling them with modules build directly.

FWIW, I now have even more current

coughlin@frink-002:~/rtest$ rails --version
Rails 2.1.0
coughlin@frink-002:~/rtest$ gem -v
1.1.1
coughlin@frink-002:~/rtest$ ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]

and strangely my developmental redmine instance still appears to be AOK despite this error and the changes I've been making.

And I still have a rails-2.0.2 gem installed as well as the new rails-2.1.0 if that matters.

I also may start over fresh on a new OS instance as well and see if things turn out differently.

Film at 11

- Brian

RE: script/about fails with "uninitialized constant Rails::Info (NameError)" - Added by Thomas Lecavelier over 16 years ago

Please freeze rails 2.0.2:

rake rails:freeze:edge TAG=rel_2-0-2

and try again.

RE: RE: script/about fails with "uninitialized constant Rails::Info (NameError)" - Added by Aleksey Gureiev over 16 years ago

To freeze RoR 2.0.2 with RoR 2.1.0 being your current version you need this:

rake rails:freeze:edge RELEASE=2.0.2

... or otherwise you will always get the edge freezed.

    (1-5/5)