Project

General

Profile

Problem with raking (undefined method `autoload_paths' for #<Rails...)

Added by Markus Ristola over 13 years ago

Hello, I just installed Ubuntu today because I was having some troubles with using Ruby and Redmine in Windows.
Anyway, I've gotten to the point of where I rake my database and I get the error:
undefined method `autoload_paths' for #<Rails::Configuration:0x7fa716b599f0>

I have googled myself senseless trying to solve this, but to no avail. I found someone on the forum with a similar problem, but not exactly the same and the solution to change
config.autoload_paths += %W( #{RAILS_ROOT}/app/sweepers )
to
config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )

didn't work for me. It just caused a different problem. I would be very grateful for any suggestions to solve this.
My versions are:
Ruby 1.8.7

  • LOCAL GEMS ***

actionmailer (2.3.11, 2.3.5)
actionpack (2.3.11, 2.3.5)
activerecord (2.3.11, 2.3.5)
activeresource (2.3.11, 2.3.5)
activesupport (2.3.11, 2.3.5)
fastthread (1.0.7)
i18n (0.4.2)
mysql (2.8.1)
rack (1.1.0, 1.0.1)
rails (2.3.11, 2.3.5)
rake (0.8.7)

and the latest trunk of Redmine.

I have tried everything I can come up with and I my fellow project compatriots can't seem to find a solution either.

midgard@ubuntu:/var/www/redmine$ rake db:migrate --trace
(in /var/www/redmine)
  • Invoke db:migrate (first_time)
  • Invoke environment (first_time)
  • Execute environment
    rake aborted!
    undefined method `autoload_paths' for #<Rails::Configuration:0x7fef58a46150>
    /var/www/redmine/config/environment.rb:27
    /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:111:in `run'
    /var/www/redmine/config/environment.rb:20
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:4
    /usr/lib/ruby/1.8/rake.rb:636:in `call'
    /usr/lib/ruby/1.8/rake.rb:636:in `execute'
    /usr/lib/ruby/1.8/rake.rb:631:in `each'
    /usr/lib/ruby/1.8/rake.rb:631:in `execute'
    /usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
    /usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/rake.rb:607:in `invoke_prerequisites'
    /usr/lib/ruby/1.8/rake.rb:604:in `each'
    /usr/lib/ruby/1.8/rake.rb:604:in `invoke_prerequisites'
    /usr/lib/ruby/1.8/rake.rb:596:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
    /usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/rake.rb:583:in `invoke'
    /usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
    /usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
    /usr/lib/ruby/1.8/rake.rb:2029:in `each'
    /usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
    /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
    /usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
    /usr/lib/ruby/1.8/rake.rb:2001:in `run'
    /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
    /usr/lib/ruby/1.8/rake.rb:1998:in `run'
    /usr/bin/rake:28

Replies (1)

RE: Problem with raking (undefined method `autoload_paths' for #<Rails...) - Added by Markus Ristola over 13 years ago

Disregard this.

I found the solution. I hadn't set proper ownership on my Redmine folder/installation, I did that and now raking works.

Sorry for taking up space, you guise.

    (1-1/1)