Ansgar Helfrich
Ansgar Helfrich

Reputation: 61

redmine upgrade

at the moment I want to upgrade redmine 1.4.0 to the latest version 2.0.2.

So I followed the howto on this page:

http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

In short I downloaded the redmine-source and extracted it in a separate folder
"/var/www/redmine-2.0.2" (whereas my working installation is in /var/www/redmine).

up to Step 3.5 everything went fine but in 3.6 the following happens:

root(at)information:/var/www/redmine-2.0.2# rake config/initializers/session_store.rb
rake aborted!
Don't know how to build task 'config/initializers/session_store.rb'

(See full trace by running task with --trace)

root(at)information:/var/www/redmine-2.0.2# rake --trace     
config/initializers/session_store.rb
rake aborted!
Don't know how to build task 'config/initializers/session_store.rb'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-
0.9.2.2/lib/rake/task_manager.rb:49:in `[]'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-   
0.9.2.2/lib/rake/application.rb:115:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-
0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake   - 
0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-
0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-
0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake- 
0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-
0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-
0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-
0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in `<top 
(required)>'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `<main>'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
root(at)information:/var/www/redmine-2.0.2#

root(at)information:/var/www/redmine-2.0.2# rake --trace generate_session_store
Invoke generate_session_store (first_time)
Invoke generate_secret_token (first_time)
Invoke config/initializers/secret_token.rb (first_time)
Execute config/initializers/secret_token.rb
Execute generate_secret_token
Execute generate_session_store
Note: The rake task generate_session_store has been deprecated, please use the         
replacement version generate_secret_token
root(at)information:/var/www/redmine-2.0.2#

root(at)information:/var/www/redmine-2.0.2# rake generate_session_store

Note: The rake task generate_session_store has been deprecated, please use the 
replacement version generate_secret_token

root(at)information:/var/www/redmine-2.0.2# rake --trace generate_secret_token
Invoke generate_secret_token (first_time)
Invoke config/initializers/secret_token.rb (first_time, not_needed)
Execute generate_secret_token

this last step seems to generate "/var/www/redmine-2.0.2/config/initializers/secret_token.rb" and according to the how to it is a sufficient substitute to the "rake-commands" before.

root(at)information:/var/www/redmine-2.0.2# 
root(at)information:/var/www/redmine-2.0.2# rake db:migrate RAILS_ENV=production 
root(at)information:/var/www/redmine-2.0.2# rake tmp:cache:clear
root(at)information:/var/www/redmine-2.0.2# rake tmp:sessions:clear 

My first prob is how to start the application. I can still go to my old installation "/var/www/redmine" and start with

ruby ./script/server -e production &

which still works, the output is:

/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-
2.3.14/lib/active_support/inflector.rb:3:in `<top (required)>': iconv will be deprecated  
in the future, use String#encode instead.
=> Booting Mongrel
=> Rails 2.3.14 application starting on http://0.0.0.0:3000
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after     
2011-11-01.
Gem.source_index called from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rails-
2.3.14/lib/rails/gem_dependency.rb:21.
=> Call with -d to detach
=> Ctrl-C to shutdown server

But I can't start the application by going to the new folder "/var/www/redmine-2.0.2/" and calling

ruby ./script/server -e production &

because there is no file

"/var/www/redmine-2.0.2/script/server".

How can I start the updated version of redmine or is not possible yet ? I think redmine 2.0.2 needs rails 3.2.5 and I thought I installed it because:

root(at)information:/var/www/redmine-2.0.2/script# rails -v
Rails 3.2.5
root(at)information:/var/www/redmine-2.0.2/script#

According to the boot protocol above Rails 2.3.14 is used. Wrong ?

Whats my mistake here ? Can somebody give advice howto succesfully upgrade ?

thanks for your help in advance!

Cheers,

Ansgar

Upvotes: 1

Views: 4262

Answers (1)

Fabio
Fabio

Reputation: 19216

Solve it by using bundle exec rails s -d -e production to start the application in background using the default port (i.e. 3000).

Update

It seems to be an RVM issue, if you open a new shell and running:

$ type rvm | head -1

does not show "rvm is a function", RVM isn't being sourced correctly.

Ensure that RVM is sourced after any path settings as RVM and manipulates the path. If you don't do this, RVM may not work as expected.

Upvotes: 1

Related Questions