Project

General

Profile

Redmine don't start (undefined method 'autoload_paths=' for...)

Added by Alexandr Kohskin over 13 years ago

Hello!

OS: Ubuntu 10.10

I install ruby, rails, some gems, redmine.
Create site for redmine (with fcgi interface)
and when try to start it, i get Error 500.

In log I have information:
[Fri Mar 25 17:51:49 2011] [notice] Apache/2.2.16 (Ubuntu) mod_fcgid/2.3.5 PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch configured -- resuming normal operations
/var/lib/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:249:in `set_autoload_paths': undefined method `autoload_paths=' for ActiveSupport::Dependencies:Module (NoMethodError)
from /var/lib/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:135:in `process'
from /var/lib/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `send'
from /var/lib/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `run'
from /var/www/projects.activestudio.ru/../config/environment.rb:20
from /var/www/projects.activestudio.ru/dispatch.fcgi:21:in `require'
from /var/www/projects.activestudio.ru/dispatch.fcgi:21

Can anybody help me?


Replies (28)

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Etienne Massip over 13 years ago

Rails 2.3.11 will be supported by Redmine 1.2.0 and is actually supported by trunk but is not supported yet by any stable version released.

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

But I have Rails 2.3.5:

abstract (1.0.0)
actionmailer (3.0.5, 2.3.11, 2.3.5)
actionpack (3.0.5, 2.3.11)
activemodel (3.0.5)
activerecord (3.0.5, 2.3.11, 2.3.5)
activeresource (3.0.5, 2.3.11, 2.3.5)
activesupport (3.0.5, 2.3.11, 2.3.5)
arel (2.0.9)
builder (3.0.0, 2.1.2)
bundler (1.0.10)
cgi_multipart_eof_fix (2.5.0)
daemon_controller (0.2.6)
daemons (1.1.0)
erubis (2.6.6)
fastthread (1.0.7)
fcgi (0.8.8)
file-tail (1.0.5)
gem_plugin (0.2.3)
i18n (0.5.0, 0.4.2)
mail (2.2.15)
mime-types (1.16)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.8.1)
passenger (3.0.5)
polyglot (0.3.1)
rack (1.2.2, 1.2.1, 1.1.1, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (2.3.11, 2.3.5)
railties (3.0.5)
rake (0.8.7)
spruz (0.2.5)
thor (0.14.6)
treetop (1.4.9)

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Etienne Massip over 13 years ago

Maybe, but your Redmine's using Rails 2.3.11 :

...
var/lib/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:249:in `set_autoload_paths': undefined method `autoload_paths=' for 
...

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Etienne Massip over 13 years ago

I still don't know your Redmine version.

Anyway, check your config/environment.rb, you must have this line :

RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

I uninstall Rails gem and install only 2.3.5, but have a same error:

[Fri Mar 25 19:57:24 2011] [notice] Apache/2.2.16 (Ubuntu) mod_fcgid/2.3.5 PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch configured -- resuming normal operations
/var/www/projects.activestudio.ru/../config/environment.rb:27: undefined method `autoload_paths' for #<Rails::Configuration:0xb7607e50> (NoMethodError)
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:111:in `run'
from /var/www/projects.activestudio.ru/../config/environment.rb:20
from /var/www/projects.activestudio.ru/dispatch.fcgi:21:in `require'
from /var/www/projects.activestudio.ru/dispatch.fcgi:21

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

Yes, i check environment.rb, it is right.

Redmine version 1.1.2 (as i show in changelog)

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

I uninstall all gems, rails, ruby, and reinstall it with checking versions. But described error remains.

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Etienne Massip over 13 years ago

Could you remove all action* and active* gems which version is 3.0.5 or 2.3.11 ?

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

I remove action* and active* gems, and now this is a list of my installed gems:
abstract (1.0.0)
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
arel (2.0.9)
builder (3.0.0, 2.1.2)
bundler (1.0.10)
cgi_multipart_eof_fix (2.5.0)
daemon_controller (0.2.6)
daemons (1.1.0)
erubis (2.6.6)
fastthread (1.0.7)
fcgi (0.8.8)
file-tail (1.0.5)
gem_plugin (0.2.3)
i18n (0.4.2)
mail (2.2.15)
mime-types (1.16)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.8.1)
passenger (3.0.5)
polyglot (0.3.1)
rack (1.0.1)
rails (2.3.5)
railties (3.0.5)
rake (0.8.7)
spruz (0.2.5)
thor (0.14.6)
treetop (1.4.9)

But I have a same problem:
[Fri Apr 01 10:41:32 2011] [notice] Apache/2.2.16 (Ubuntu) mod_fcgid/2.3.5 PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch configured -- resuming normal operations
/var/www/projects.activestudio.ru/../config/environment.rb:27: undefined method `autoload_paths' for #<Rails::Configuration:0xb7665ec4> (NoMethodError)
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:111:in `run'
from /var/www/projects.activestudio.ru/../config/environment.rb:20
from /var/www/projects.activestudio.ru/dispatch.fcgi:21:in `require'
from /var/www/projects.activestudio.ru/dispatch.fcgi:21

I don't understand why...

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

I remove it, but error remains:
...undefined method `autoload_paths` for #<Rails::Configuration:*0xb7580734*>.....

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Etienne Massip over 13 years ago

What if you run Redmine with ruby script/server ?

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

redmine@userver:~/script$ ./server
=> Booting WEBrick
=> Rails 2.3.5 application starting on 
/home/redmine/config/environment.rb:27: undefined method `autoload_paths' for #<Rails::Configuration:0xb73888a0> (NoMethodError)
        from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:111:in `run'
        from /home/redmine/config/environment.rb:20
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
        from /var/lib/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from ./server:3

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

redmine@userver:~/script$ ./server
=> Booting WEBrick
=> Rails 2.3.5 application starting on _ttp://0.0.0.0:3000
/home/redmine/config/environment.rb:27: undefined method `autoload_paths' for #<Rails::Configuration:0xb73888a0> (NoMethodError)
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:111:in `run'
from /home/redmine/config/environment.rb:20
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from ./server:3

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Etienne Massip over 13 years ago

What's your RubyGem version (copy the result of gem environment command) ?

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

akv@userver:~$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /home/akv/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

I don't understand, what command I must run?

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

I uninstall meny additional gems, now my list:
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
fcgi (0.8.8)
i18n (0.4.2)
mail (2.2.15)
mime-types (1.16)
mysql (2.8.1)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)

And error remains:
/var/www/projects.activestudio.ru/../config/environment.rb:27: undefined method `autoload_paths' for #<Rails::Configuration:0xb766e45c> (NoMethodError)
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:111:in `run'
from /var/www/projects.activestudio.ru/../config/environment.rb:20
from /var/www/projects.activestudio.ru/dispatch.fcgi:21:in `require'
from /var/www/projects.activestudio.ru/dispatch.fcgi:21

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Etienne Massip over 13 years ago

Well, just replace config.autoload_paths= with config.load_paths= in you file config/environment.rb, that should do the trick, but you should have no such line with redmine 1.1.2.

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

Ok, i edit environment.rb, but now:

[Fri Apr 08 14:10:56 2011] [notice] Apache/2.2.16 (Ubuntu) mod_fcgid/2.3.5 PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch configured -- resuming normal operations
/var/lib/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 /home/redmine/config/initializers/10-patches.rb:87:in `alias_method': undefined method `convert_to_without_fallback_on_iso_8859_1' for class `Class' (NameError)
from /home/redmine/config/initializers/10-patches.rb:87
from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load_without_new_constant_marking'
from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load'
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
from /var/www/projects.activestudio.ru/../config/environment.rb:20
from /var/www/projects.activestudio.ru/dispatch.fcgi:21:in `require'
from /var/www/projects.activestudio.ru/dispatch.fcgi:21

May be i need to install some additional gems? You can see list of my gems in my last posts.

RE: Redmine don't start (undefined method 'autoload_paths=' for...) - Added by Alexandr Kohskin over 13 years ago

Thank you for helping:)

I solve last error with installing TMail gem.

After that, I install mysql gem, run migrate, and, oh it's miracle, everything start working properly.

(1-25/28)