Issues with "uninitialized constant " errors

Added by Pete Olsen about 10 years ago

I had an install of 0.8.4? and I upgraded to 0.8.7 but I was having some issues. After trying to fix those for a while my whole install was basically dead with "uninitialized constant" errors. For GraviatarHelper and others. I hunted around to no avail trying various fixes. I finally gave up and tried to start from scratch.

So, following the instructions on the RedmineInstall page I downloaded a fresh copy from the repository and now I keep getting strange errors like the one below.

I have 3 examples of the issue wile running rake commands indicated at the very beginning of the install instructions.

I appreciate any help I can get,
Thanks
Pete.

While running: rake config/initializers/session_store.rb --trace

# rake config/initializers/session_store.rb --trace
(in /data/redmine-0.8.1)
** Invoke config/initializers/session_store.rb (first_time)
** Execute config/initializers/session_store.rb
rake aborted!
uninitialized constant Rails::SecretKeyGenerator
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing'
/data/redmine-0.8.1/lib/tasks/initializers.rake:5
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

Here is another example while running: RAILS_ENV=production rake db:migrate --trace

# RAILS_ENV=production rake db:migrate --trace
(in /data/redmine-0.8.1)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant ActionController::Session::PStore
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session_management.rb:19:in `const_get'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session_management.rb:19:in `session_store='
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:602:in `send'

rake, version 0.8.7
gem 1.3.5
Rails 2.3.4

  • LOCAL GEMS ***
    actionmailer (2.3.4, 2.2.2)
    actionpack (2.3.4, 2.2.2)
    activerecord (2.3.4, 2.2.2)
    activeresource (2.3.4, 2.2.2)
    activesupport (2.3.4, 2.2.2)
    columnize (0.3.1)
    linecache (0.43)
    mysql (2.8.1)
    rack (1.0.1)
    rails (2.3.4, 2.2.2)
    rake (0.8.7)
    rspec (1.2.9)
    ruby-debug (0.10.3)
    ruby-debug-base (0.10.3)

Linux xxxxxm 2.6.9-78.0.22.EL #1 Thu Apr 30 19:03:25 EDT 2009 i686 i686 i386 GNU/Linux

Replies (2)

RE: Issues with "uninitialized constant " errors - Added by Francis Perea about 10 years ago

Hi Pete, same problem here under Mac OS X Server 10.5.

Did you solve it?

Also looking for any help.

Tanks in advance.

Regards,

Francis Perea

RE: Issues with "uninitialized constant " errors - Added by Francis Perea about 10 years ago

Just to let know, the 0.8.7 download package from RubyForge worked like a charm.

(1-2/2)