Initialization fails: "undefined method 'add_frozen_gem_path'"

Added by Artem Komarov over 10 years ago

E:\bin\_dev\xampp\htdocs\redmine>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
E:\bin\_dev\xampp\htdocs\redmine>rails -v
Rails 2.3.2
E:\bin\_dev\xampp\htdocs\redmine>rake -V
rake, version 0.8.4
E:\bin\_dev\xampp\htdocs\redmine>gem -v
1.3.1

E:\bin\_dev\xampp\htdocs\redmine>rake db:migrate RAILS_ENV="production" --trace
(in E:/bin/_dev/xampp/htdocs/redmine)
rake aborted!
undefined method `add_frozen_gem_path' for Rails::GemDependency:Class
E:/bin/_dev/xampp/htdocs/redmine/config/boot.rb:47:in `load_initializer'
E:/bin/_dev/xampp/htdocs/redmine/config/boot.rb:38:in `run'
E:/bin/_dev/xampp/htdocs/redmine/config/boot.rb:11:in `boot!'
E:/bin/_dev/xampp/htdocs/redmine/config/boot.rb:110
E:/bin/_dev/xampp/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
E:/bin/_dev/xampp/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
E:/bin/_dev/xampp/htdocs/redmine/rakefile:4
E:/bin/_dev/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2359:in `load'
E:/bin/_dev/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2359:in `raw_load_rakefile'
E:/bin/_dev/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1993:in `load_rakefile'
E:/bin/_dev/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
E:/bin/_dev/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1992:in `load_rakefile'
E:/bin/_dev/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1976:in `run'
E:/bin/_dev/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
E:/bin/_dev/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
E:/bin/_dev/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31
E:/bin/_dev/xampp/ruby/bin/rake:16:in `load'
E:/bin/_dev/xampp/ruby/bin/rake:16

Please suggest something. Installation of ruby, rails and rubygems seems to be ok.

Replies (6)

RE: Initialization fails: "undefined method 'add_frozen_gem_path'" - Added by Artem Komarov over 10 years ago

Sorry, my OS version:

E:\bin\_dev\xampp\htdocs\redmine>ver
Microsoft Windows [Версия 6.0.6001]

RE: Initialization fails: "undefined method 'add_frozen_gem_path'" - Added by Artem Komarov over 10 years ago

Really no ideas?
Please help me to figure this out!

RE: Initialization fails: "undefined method 'add_frozen_gem_path'" - Added by Eric Davis over 10 years ago

Artem Komarov wrote:

rails -v

Rails 2.3.2

Redmine isn't compatible with Rails 2.3.2. Please see the compatibility chart at: RedmineInstall

Eric

RE: Initialization fails: "undefined method 'add_frozen_gem_path'" - Added by Artem Komarov over 10 years ago

E:\bin\_dev\xampp\htdocs\redmine>rake db:migrate RAILS_ENV="production"
(in E:/bin/_dev/xampp/htdocs/redmine)
rake aborted!
undefined method `add_frozen_gem_path' for Rails::GemDependency:Class
E:/bin/_dev/xampp/htdocs/redmine/rakefile:4
(See full trace by running task with --trace)

E:\bin\_dev\xampp\htdocs\redmine>rails -v
Rails 2.2.2

any other minds? I've uninstalled v2.3.2 and still getting the same

RE: Initialization fails: "undefined method 'add_frozen_gem_path'" - Added by Coty Rosenblath over 10 years ago

I imagine you've resolve this by now, but I believe the problem was that somewhere along the way, your config/boot.rb was updated to the Rails 2.3.2 structure, including the call to add_frozen_gem_path. The cleanest thing to do would be to get a clean install of the Redmine code. You can also just comment out that bit of the boot.rb file. I think that is the only significant change between 2.2.2 and 2.3.2.

RE: Initialization fails: "undefined method 'add_frozen_gem_path'" - Added by Artem Komarov over 10 years ago

Finally the solution!
Thank you very much for the reply - things came up just as you have explained.
When I've looked into boot.rb of a clean distributive I haven't found there this line:
Rails::GemDependency.add_frozen_gem_path
After I've commented it - rake db:migrate command began to work.
Once more - thank you for the update!

(1-6/6)