Project

General

Profile

Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv)

Added by Jean-Michel C. over 12 years ago

Hi there,
I have been using Redmine for a little while and find it great (especially the integration with MyLin and Eclipse)...

This was all fun and good to the point where I (possibly stupidly) tried to upgrade my install...

Redmine failed to upgrade and spit out the following:

Paramétrage de redmine (1.2.1-1~maverick+4) ...
dbconfig-common: writing config to /etc/dbconfig-common/redmine/instances/default.conf

Creating config file /etc/redmine/default/database.yml.new with new version
dbconfig-common: flushing administrative password
Populating database for redmine instance "default".
This may take a while.
rake aborted!
undefined method `autoload_paths' for #<Rails::Configuration:0xb73ba0f8>

(See full trace by running task with --trace)
Error when running rake db:migrate, check database configuration.
exit: 283: Illegal number: -1
dpkg : erreur de traitement de redmine (--configure) :
 le sous-processus script post-installation installé a retourné une erreur de sortie d'état 2
Des erreurs ont été rencontrées pendant l'exécution :
 redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)

Obviously the redmine page does not show anymore and I do have a Passeneger error page instead (with the same error).

When I run RAILS_ENV=YOUR_ENVIRONMENT script/about I get the following (which does not look good):

/usr/share/redmine/config/environment.rb:32: undefined method `[]' for nil:NilClass (NoMethodError)
        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 /usr/share/redmine/vendor/rails/railties/lib/commands/about.rb:1
        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 script/about:4

rails -v told me that I had 2.3.5 installed and I tried to install 2.3.11 (gem install rails -v 2.3.11), rails -v still say 2.3.5, but it 2.3.11 is in the list of local gems now....

As you may have understood, I know nothing about Ruby or Rails....

Unsurprisingly, trying to run the app from command line fails the same way.

sudo ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://127.0.0.1:3000
/usr/share/redmine/config/environment.rb:52: undefined method `autoload_paths' for #<Rails::Configuration:0xb7554558> (NoMethodError)
        from /usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:111:in `run'
        from /usr/share/redmine/config/environment.rb:45
        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 /usr/lib/ruby/1.8/active_support/dependencies.rb:156:in `require'
        from /usr/lib/ruby/1.8/active_support/dependencies.rb:521:in `new_constants_in'
        from /usr/lib/ruby/1.8/active_support/dependencies.rb:156:in `require'
        from /usr/share/redmine/vendor/rails/railties/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 script/server:3

Ah and finally, my gems (no idea what this means, but I read that I shall provide this).

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
rack (1.1.2)
rails (2.3.11)
rake (0.9.2)

Your help is welcome.

Many thanks in advance.

Jean-Michel


Replies (12)

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Jean-Michel C. over 12 years ago

I would really appreciate some help ;)...

If something is missing from my configuration, please tell me and I'll do my best to provide what's needed.

JM

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Etienne Massip over 12 years ago

If you have a rails dir in you vendor directory, try to remove it.

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Jean-Michel C. over 12 years ago

Hi Etienne,
rails was a link to /usr/share/rails-ruby1.8.

I renamed it and fired the apt-get upgrade again.
I had the error described above and the link was recreated.

If you have other ideas, please fire.

Jean-Michel

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Jean-Michel C. over 12 years ago

Etienne, sorry, I spoke too soon.

This is not exactely the same thing.

The upgrade process still fails, but the homepage of redmine now displays.

I get an internal server error whe I click on the link of one of the projects and I suspect this is due to a DB structure inconsistency (as the DB upgrade process did not happen).

Is ther any way I can upgrade the DB "manually" ?

Many thanks.

JM

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Etienne Massip over 12 years ago

Check RedmineUpgrade,, you'll have to run a rake db:migrate command.

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Jean-Michel C. over 12 years ago

The rake command produced an error as well.

It seems like a constant was not initialised.

Thanks again.
JM

/usr/share/redmine$ rake db:migrate RAILS_ENV=production --trace
(in /usr/share/redmine)
rake aborted!
uninitialized constant Rake::DSL
/usr/lib/ruby/1.8/rake.rb:2503:in `const_missing'
/var/lib/gems/1.8/gems/rake-0.9.2/lib/rake/tasklib.rb:8
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/gems/1.8/gems/rake-0.9.2/lib/rake/testtask.rb:4
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/share/redmine/Rakefile:7
/usr/lib/ruby/1.8/rake.rb:2383:in `load'
/usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2000: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

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Etienne Massip over 12 years ago

Rake 0.9.2 is not supported by Redmine yet, see RedmineInstall.

If you absolutely need to have Rake 0.9.2 installed, have a look to #8588.

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Jean-Michel C. over 12 years ago

Hi again Etienne,
I do not need a specific version of rake (I do not have any other Ruby software on my box).

Ths issue is that I have no idea how to revert to rake 0.8.7... Could you please give me a hint?

As well, I tried the fix in your link, it helped performing the db upgrade but now fails on login (step after step, we will get there ;)).

Thanks in advance.
Jean-Michel

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Etienne Massip over 12 years ago

Jean-Michel C. wrote:

Ths issue is that I have no idea how to revert to rake 0.8.7... Could you please give me a hint?

gem install rake --version=0.8.7 and then gem uninstall rake --version=0.9.2.

As well, I tried the fix in your link, it helped performing the db upgrade but now fails on login (step after step, we will get there ;)).

What do you mean with fails on login?

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Jean-Michel C. over 12 years ago

Hi Etienne,
what I meant by fails on login is that I was getting an HTTP 500 error when loging in (when validating user name and pwd on the login panel).

The VERY good news is that this has gone away as well and everything now seems to work.

Many, many thanks.
JM

RE: Redmine failed to upgrade to 1.2.1 on Ubuntu 10.10 (srv) - Added by Etienne Massip over 12 years ago

Jean-Michel C. wrote:

what I meant by fails on login is that I was getting an HTTP 500 error when loging in (when validating user name and pwd on the login panel).

If it reproduces, check your log/production.log.

    (1-12/12)