Project

General

Profile

Cannot Upgrade Redmine 0.9.6 to Redmine 1.X

Added by Alex Kah over 13 years ago

I have been trying to upgrade Redmine to any 1.X version but am unable to run the necessary rake tasks to complete the upgrade. Below is an output of "rake db:migrate" .

[web@corp devredmine]$ rake db:migrate RAILS_ENV="production" --trace
(in /home/web/devredmine)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant ActiveRecord::Acts::Tree
/home/web/devredmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:443:in `load_missing_constant'
/home/web/devredmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/home/web/devredmine/vendor/plugins/acts_as_tree/init.rb:1:in `evaluate_init_rb'
/home/web/devredmine/config/../vendor/rails/railties/lib/rails/plugin.rb:158:in `evaluate_init_rb'
/home/web/devredmine/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/home/web/devredmine/config/../vendor/rails/railties/lib/rails/plugin.rb:154:in `evaluate_init_rb'
/home/web/devredmine/config/../vendor/rails/railties/lib/rails/plugin.rb:48:in `load'
/home/web/devredmine/config/../vendor/plugins/engines/lib/engines/plugin.rb:44:in `load'
/home/web/devredmine/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:38:in `load_plugins'
/home/web/devredmine/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `each'
/home/web/devredmine/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `load_plugins'
/home/web/devredmine/config/../vendor/rails/railties/lib/initializer.rb:369:in `load_plugins'
/home/web/devredmine/config/../vendor/rails/railties/lib/initializer.rb:165:in `process'
/home/web/devredmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/home/web/devredmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
/home/web/devredmine/config/environment.rb:20
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/home/web/devredmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/home/web/devredmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/web/devredmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/home/web/devredmine/vendor/rails/railties/lib/tasks/misc.rake:4
/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:607:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596: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

Could anyone point me in the right direction?


Replies (21)

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Alex Kah over 13 years ago

Wanted to add a bit more to this. I started with redmine version 0.9.3 and was able to upgrade to 0.9.6 without issue. I then attempted to upgrade to 1.0.2 and 1.0.0 without any luck. I have tried removing any plugins but still run into the same issue. I also tried to rename vendor/rails to see if the installed rails v2.3.5 would work properly but no luck there either. I also tried to install the acts_as_tree gem and remove the plugin from vendor/plugins to see if that helped but still ran into the issue.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Felix Schäfer over 13 years ago

What rails, rake, rack and ruby versions do you have? Also make sure that all your files are "pristine" and haven't been corrupted somehow.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Alex Kah over 13 years ago

Hello Felix -- Thanks for the reply. Below is the information you requested.

[root@corp src]# rails --version
Rails 2.3.5
[root@corp src]# ruby --version
ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
[root@corp src]# rake --version
rake, version 0.8.7
[root@corp src]#

I don't believe any files are corrupted since I was able to upgrade the same 0.9.3 redmine installation to 0.9.6 without issue. I then tried upgrading 0.9.3 straight to 1.0.0 and 1.0.2 with the same error above as well as 0.9.6 to 1.0.0 and 1.0.2 with the same error as above.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Felix Schäfer over 13 years ago

I'm at a loss here, sorry. ActsAsTree hasn't seen changes in a year, the init.rb not in three… Best advice I could give you would be to download a clean package, make a copy of your DB and point the clean install to that DB, see if the problem persists.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Alex Kah over 13 years ago

Thanks again for the responses Felix... I appreciate it.

I tried this previously without any luck but wanted to try again base don your recommendation. This time I downloaded a fresh copy of redmine and did a fresh installation. During the initial migration I get the same ActsAsTree error so it must be some conflict on the server itself though I can't find it so far. If you have any more ideas let me know and again I appreciate your advice so far.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Felix Schäfer over 13 years ago

Well, the patchlevel of your ruby is a little low, but IIRC redmine should work on 1.8.6 too, so that shouldn't be the problem… Weird line ending/file encoding issue? Try your DB on another machine? I really don't know what could be the cause of this anymore, sorry.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Alex Kah over 13 years ago

I don't know of any encoding issues but I guess that is always a possibility. Are you suggesting I attempt to process the database migration on another machine and then use it back on the intended server? I am going to look more into possible encoding issues.

I also updated all the packages on the server including the kernel to the latest in the package manager repositories however that didn't make a difference. If anyone has any ideas I would love to hear them.

Regardless I will update once I find a resolution.

Felix - thanks again for the responses and putting some fresh ideas in my head.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Felix Schäfer over 13 years ago

Alex Kah wrote:

I don't know of any encoding issues but I guess that is always a possibility. Are you suggesting I attempt to process the database migration on another machine and then use it back on the intended server? I am going to look more into possible encoding issues.

I was thinking of issues wrt the file encoding, that maybe the init.rb from acts_as_tree has a wonky line-end or whatever.

The suggestion was to try to install redmine on another server and try a "blank" migration there, and then (on another DB) a migration up from your current DB. That might give some hints as to whether the server or whatever else is responsible for this error.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Eric Davis over 13 years ago

Can you post the contents of your vendor/plugins/acts_as_tree? (ls -l vendor/plugins/acts_as_tree)

And also post the output from ruby script/about. I see you have a version of Rails in vendor/rails so we need to make sure it's 2.3.5.

Eric Davis

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Lukasz Zabik over 13 years ago

I have the same issue trying to upgrade Redmine 0.8.5 to Redmine 1.X.
Can anyone help.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Lukasz Zabik over 13 years ago

Lukasz Zabik wrote:

I have the same issue trying to upgrade Redmine 0.8.5 to Redmine 1.X.
Can anyone help.

I am able to install redmine but, I cannot upgrade. The problem looks the same as described above.
I am runign windows xp, besides configuration looks the same.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Felix Schäfer over 13 years ago

Lukasz Zabik wrote:

Can anyone help.

Please provide the information Eric asked Alex for, and we might be able to.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Lukasz Zabik over 13 years ago

Felix Schäfer wrote:

Lukasz Zabik wrote:

Can anyone help.

Please provide the information Eric asked Alex for, and we might be able to.

C:\>rails --version
Rails 2.3.5

C:\>ruby --version
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] (I tried also 1.8.7)

C:\>rake --version
rake, version 0.8.7

upgrade to 1.0.2 form 0.8.5 (2903)

I tried to make clean redmine install (1.0.2) and it works.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Alex Kah over 13 years ago

Eric -- Sorry for the delay. Here is the information you requested.

[web@dev devredmine]$ rake db:migrate RAILS_ENV=production
(in /home/web/devredmine)
rake aborted!
uninitialized constant ActiveRecord::Acts::Tree

(See full trace by running task with --trace)
[web@dev devredmine]$ ls -l vendor/plugins/acts_as_tree
total 20
-rw-r--r-- 1 web web   59 Dec 10  2007 init.rb
drwxr-xr-x 3 web web 4096 Sep 26 17:45 lib
-rw-r--r-- 1 web web  548 Dec 10  2007 Rakefile
-rw-r--r-- 1 web web  779 Dec 10  2007 README
drwxr-xr-x 3 web web 4096 Sep 26 17:45 test
[web@dev devredmine]$ ruby script/about
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Edge Rails revision       unknown
Application root          /home/web/devredmine
Environment               development
Database adapter          mysql
Database schema version   20100221100219

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Alex Kah over 13 years ago

Lukasz Zabik wrote:

Lukasz Zabik wrote:

I have the same issue trying to upgrade Redmine 0.8.5 to Redmine 1.X.
Can anyone help.

I am able to install redmine but, I cannot upgrade. The problem looks the same as described above.
I am runign windows xp, besides configuration looks the same.

Hello Lukas -- Did you find a solution?

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Alex Kah over 13 years ago

Does anyone else have any further ideas? I am confident it is something server related but not sure how to proceed. I have multiple other Ruby/Rails applications running without issue on the same server.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Felix Schäfer over 13 years ago

Alex Kah wrote:

Does anyone else have any further ideas? I am confident it is something server related but not sure how to proceed. I have multiple other Ruby/Rails applications running without issue on the same server.

I didn't follow the whole conversation, but does a vanilla 1.0-stable work on there?

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Alex Kah over 13 years ago

Hello Felix,

The same issue occurs on a vanilla 1.0-stable.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Jay Stotz over 13 years ago

Anybody come up with a solution to this?

I'm having the same issue upgrading from 0.8.7. I downloaded this file and verified the md5sum: http://rubyforge.org/frs/download.php/73457/redmine-1.0.4.tar.gz

Here's my script/about output:

RAILS_ENV=production script/about 
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.6
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Edge Rails revision       unknown
Application root          /home/dev/redmine-1.0.4
Environment               production
Database adapter          mysql
Database schema version   20091227112908

I tried manually adding this line to config/environment.rb:

require 'vendor/plugins/acts_as_tree/lib/active_record/acts/tree'

When I did, it moved past the "uninitialized constant ActiveRecord::Acts::Tree" error to this:

RAILS_ENV=production rake db:migrate        
(in /home/dev/redmine-1.0.4)
rake aborted!
uninitialized constant Redmine::I18n

If I manually require lib/redmine/i18n it goes on to failing to load another constant. So it appears to be a problem related to ActiveSupport's dependency loading.

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by cecep suryana over 13 years ago

at first i had a similar problem and redmine did not run.
and then i reinstall rails and rake
when i start redmine with thin, i still get the following error

/usr/local/www/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement

my redmine is running without any plugin. although i am quite satisfied, but the problem is still there

RE: Cannot Upgrade Redmine 0.9.6 to Redmine 1.X - Added by Alex Kah over 13 years ago

Upgrade Issue Resolved

This ended up being a ruby/rubygems conflict issue. Ruby was installed via a package manager on this server as well as via source so ruby existed in /usr/bin and /usr/local/bin. I removed both versions of ruby, created some RPMS for CentOS, reinstalled ruby, reinstalled rubygems, and then installed the necessary gems to resolve the problem.

    (1-21/21)