Project

General

Profile

Actions

Defect #2441

closed

Upgrade rake migration fails: uninitialized constant ActiveSupport::Dependencies

Added by micah anderson about 15 years ago. Updated about 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
2009-01-04
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

I'm trying to upgrade from the previous release of redmine to the latest, and was following the Upgrade doc on the wiki to do the database migration, however when I do it I get the following:

rake db:migrate RAILS_ENV="production" --trace
(in /usr/share/redmine)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant ActiveSupport::Dependencies
/usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:278:in `load_missing_constant'
/usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:467:in `const_missing'
/usr/share/redmine/vendor/plugins/actionwebservice/init.rb:4:in `evaluate_init_rb'
/usr/share/redmine/vendor/rails/railties/lib/rails/plugin.rb:95:in `evaluate_init_rb'
/usr/share/redmine/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/usr/share/redmine/vendor/rails/railties/lib/rails/plugin.rb:91:in `evaluate_init_rb'
/usr/share/redmine/vendor/rails/railties/lib/rails/plugin.rb:44:in `load'
/usr/share/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:33:in `load_plugins'
/usr/share/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `each'
/usr/share/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `load_plugins'
/usr/share/redmine/vendor/rails/railties/lib/initializer.rb:283:in `load_plugins'
/usr/share/redmine/vendor/rails/railties/lib/initializer.rb:138:in `process'
/usr/share/redmine/vendor/rails/railties/lib/initializer.rb:93:in `send'
/usr/share/redmine/vendor/rails/railties/lib/initializer.rb:93:in `run'
/usr/share/redmine/config/environment.rb:20
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in `require'
/usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in `new_constants_in'
/usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in `require'
/usr/share/redmine/vendor/rails/railties/lib/tasks/misc.rake:3
/usr/lib/ruby/1.8/rake.rb:546:in `call'
/usr/lib/ruby/1.8/rake.rb:546:in `execute'
/usr/lib/ruby/1.8/rake.rb:541:in `each'
/usr/lib/ruby/1.8/rake.rb:541:in `execute'
/usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:518:in `invoke_prerequisites'
/usr/lib/ruby/1.8/rake.rb:1183:in `each'
/usr/lib/ruby/1.8/rake.rb:1183:in `send'
/usr/lib/ruby/1.8/rake.rb:1183:in `each'
/usr/lib/ruby/1.8/rake.rb:515:in `invoke_prerequisites'
/usr/lib/ruby/1.8/rake.rb:507:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:494:in `invoke'
/usr/lib/ruby/1.8/rake.rb:1931:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1909:in `each'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1903:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1881:in `run'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1878:in `run'
/usr/bin/rake:28

am I missing something here?

Actions #1

Updated by Jean-Philippe Lang about 15 years ago

Run ruby script/about please (see SubmittingBugs).

Actions #2

Updated by micah anderson about 15 years ago

Jean-Philippe Lang wrote:

Run ruby script/about please (see SubmittingBugs).

Sorry, I forgot to mention this in the original bug report, when I run 'ruby script/about' I get the same error:

root@labs_bak:/usr/share/redmine# ruby script/about
/usr/share/redmine/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:278:in `load_missing_constant': uninitialized constant ActiveSupport::Dependencies (NameError)
    from /usr/share/redmine/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:467:in `const_missing'
    from /usr/share/redmine/vendor/plugins/actionwebservice/init.rb:4:in `evaluate_init_rb'
    from /usr/share/redmine/vendor/rails/railties/lib/rails/plugin.rb:95:in `evaluate_init_rb'
    from /usr/share/redmine/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /usr/share/redmine/vendor/rails/railties/lib/rails/plugin.rb:91:in `evaluate_init_rb'
    from /usr/share/redmine/vendor/rails/railties/lib/rails/plugin.rb:44:in `load'
    from /usr/share/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:33:in `load_plugins'
    from /usr/share/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `each'
    from /usr/share/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `load_plugins'
    from /usr/share/redmine/vendor/rails/railties/lib/initializer.rb:283:in `load_plugins'
    from /usr/share/redmine/vendor/rails/railties/lib/initializer.rb:138:in `process'
    from /usr/share/redmine/vendor/rails/railties/lib/initializer.rb:93:in `send'
    from /usr/share/redmine/vendor/rails/railties/lib/initializer.rb:93:in `run'
    from /usr/share/redmine/config/environment.rb:20
    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 /usr/share/redmine/vendor/rails/railties/lib/commands/about.rb:1
    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
Actions #3

Updated by Jean-Philippe Lang about 15 years ago

OK, what is the rails version in /usr/share/redmine/vendor/rails ?

Actions #4

Updated by micah anderson about 15 years ago

Jean-Philippe Lang wrote:

OK, what is the rails version in /usr/share/redmine/vendor/rails ?

I'm not finding an obvious way to locate the version number, but poking around in the directories and reading a few Changelog files, it looks to be 2.1.0.

Actions #5

Updated by Marco Tralles about 15 years ago

Same problem here - today i tryed to upgrade from 0.7.3 to 0.8 - running on debian, so the ruby is the the debain-package i think - and rails is updatet regulary via gem update …

i've some directory - so i upate manualy:

/redmine -> /versions/redmine-0.8/
/versions/
/versions/redmine-0.7.0/
/versions/redmine-0.7.1/
/versions/redmine-0.7.2/
/versions/redmine-0.7.3/
/versions/redmine-0.8/

with the symlink i can switch to the running version - in each version the files-directory is a symlink to a dedicated files-folder …

i installed the 0.8 version as i did it before with the 7.x versions.
as i tryed to rake migrate it stoped …


redmine# script/server 
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:266:in `load_missing_constant': uninitialized constant ActiveSupport::Dependencies (NameError)
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
    from /home/htdocs/projekte-qbit/versions/redmine-0.8/vendor/plugins/actionwebservice/init.rb:4:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:79:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:75:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:39:in `load'
    from /home/htdocs/projekte-qbit/versions/redmine-0.8/config/../vendor/plugins/engines/lib/engines/plugin.rb:77:in `load'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/loader.rb:33:in `load_plugins'
     ... 33 levels...
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from script/server:3
redmine# rails -v
Rails 2.2.2
redmine# ruby -v
ruby 1.8.6 (2007-09-23 patchlevel 110) [x86_64-linux]
redmine# script/about
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:266:in `load_missing_constant': uninitialized constant ActiveSupport::Dependencies (NameError)
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
    from /home/htdocs/projekte-qbit/versions/redmine-0.8/vendor/plugins/actionwebservice/init.rb:4:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:79:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:75:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:39:in `load'
    from /home/htdocs/projekte-qbit/versions/redmine-0.8/config/../vendor/plugins/engines/lib/engines/plugin.rb:77:in `load'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/loader.rb:33:in `load_plugins'
     ... 9 levels...
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/about.rb:1
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from script/about:3
Actions #6

Updated by Marco Tralles about 15 years ago

hmm - i'm sorry - but - i love redmine - and i was realy angry that this error is first-time problem in redmine - so i decide to retry the installation …

well - it runs …

  • installed using the redmine-0.8.0.tar.gz from RubyForge - it works
  • installed using the svn co svn://rubyforge.org/var/svn/redmine/branches/0.8-stable redmine-0.8 command - it's defective

i'm a little curius about that behavior - but maybe this discovery may help.

Actions #7

Updated by Marco Tralles about 15 years ago

i switched back to 0.7.3. because #2444

Actions #8

Updated by Karl Heinz Marbaise about 15 years ago

Hi,

Redmine 0.8.0 does not Support Rails 2.2.

You have to use Rails 2.1.

Kind regards
Karl Heinz Marbaise

Actions #9

Updated by Karl Heinz Marbaise about 15 years ago

  • Status changed from New to Closed
Actions #10

Updated by micah anderson about 15 years ago

  • Status changed from Closed to Reopened

I'm sorry, but I would like to re-open this bug because I am the original submitter and I didn't say I had rails 2.2, I have rails 2.1. There was another person who commented on the bug, Marco Tralles, who had rails 2.2, but not me.

Actions #11

Updated by micah anderson about 15 years ago

micah anderson wrote:

I'm sorry, but I would like to re-open this bug because I am the original submitter and I didn't say I had rails 2.2, I have rails 2.1. There was another person who commented on the bug, Marco Tralles, who had rails 2.2, but not me.

In fact everything that is in the vendor directory comes directly from the tarball, I didn't change any of that. However, I suspect that perhaps the debian packages perhaps are conflicting with these?

Side note: I dont really understand the deal with ruby on rails packages and why they need to ship their own versions of all the libraries in vendor, isn't there such thing as a stable ABI that the libraries export so that you don't need to embed copies of libraries that you know work, and instead declare dependencies on particular library version numbers? Does rails/ruby library people not understand the point of this concept yet? It seems that way... not redmine's fault at all, just a general observation about ruby/rails applications.

Actions #12

Updated by Jean-Philippe Lang about 15 years ago

uninitialized constant ActiveSupport::Dependencies

This error means you're using an earlier version of Rails but not 2.1.2

I'm not finding an obvious way to locate the version number, but poking around in the directories and reading a few Changelog files, it looks to be 2.1.0.

Indeed.

In fact everything that is in the vendor directory comes directly from the tarball

I don't know how Rails 2.1.2 that is included with the tarball was replaced by Rails 2.1.0 on your install...
Anyway, remove ./vendor/rails and run gem install rails -v=2.1.2

Marco, #2444 is not an issue. It's due to a wrong upgrade.

Actions #13

Updated by Jérémy Lal about 15 years ago

In fact everything that is in the vendor directory comes directly from the tarball

I don't know how Rails 2.1.2 that is included with the tarball was replaced by Rails 2.1.0 on your install...
Anyway, remove ./vendor/rails and run gem install rails -v=2.1.2

i have an idea about that, because i had the same issue :
may be it comes from the package (deb, rpm, ...) you used ?
for example, some alpha debian package is around, that replaces ./vendor/rails with a link to the rails
debian install, which is, unfortunately, stuck to 2.1.0. That was good with 0.7.4, but not with 0.8.
The rails debian package maintainer tells he waits lenny release to update it
to 2.1.2. So of course the only solution for now is to do what you say (remove ./vendor/rails...)

Actions #14

Updated by Eric Davis about 15 years ago

Also whenever a Rails 2.1.1 application starts, it prints it's version to the console:

$ ruby script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.1.1 application starting on http://0.0.0.0:3000                            # <<<< Rails 2.1.1 is what's being used.
=> Debugger enabled
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with production environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready.  TERM => stop.  USR2 => restart.  INT => stop (no restart).
** Rails signals registered.  HUP => reload (without restart).  It might not work well.
** Mongrel 1.1.5 available at 0.0.0.0:3000
** Use CTRL-C to stop.
Actions #15

Updated by Jean-Philippe Lang about 15 years ago

  • Status changed from Reopened to Closed
Actions #16

Updated by Richard Hurt about 15 years ago

i have an idea about that, because i had the same issue :
may be it comes from the package (deb, rpm, ...) you used ?
for example, some alpha debian package is around, that replaces ./vendor/rails with a link to the rails
debian install, which is, unfortunately, stuck to 2.1.0. That was good with 0.7.4, but not with 0.8.

That is my alpha Redmine Debian package and yes, it is waiting on Rails 2.1.2 to magically appear on Debian. :( Hopefully, when Lenny gets released we will be able to get updated Ruby, Rails, Rake, etc. on Squeeze (the next version of Debian testing).

Thank you for your patience.

Actions

Also available in: Atom PDF