Problems while Upgade 0.8.7 to 0.9.3

Added by Viltér Panitz over 10 years ago

Hi,

I'm trying to upgrade my Redmine 0.8.7 to 0.9.3, but I'm passing through some problems.

When I try to update rail's version to 2.3.5 it brokes.

C:\rails\ruby\bin>gem install rails -v=2.3.5
Updating metadata for 1 gems from http://gems.rubyforge.org
.
complete
ERROR: could not find rails locally or in a repository

When I run with verbouse mode, I got this message:

C:\rails\ruby\bin>gem install rails -v=2.3.5 -V
ERROR: While executing gem ... (NameError)
undefined local variable or method `ex' for #<Gem::SourceInfoCache:0x2b5bccc

Thanks in advance.
Viltér Panitz.

Replies (9)

RE: Problems while Upgade 0.8.7 to 0.9.3 - Added by Felix Schäfer over 10 years ago

This seems to be a problem with rubygems, have you tried updating the rubygems package first? Also, if you use the packaged version of redmine, I think rails is frozen in it, i.e. you don't need to install it for the packaged version of redmine as it is shipped with redmine.

RE: Problems while Upgade 0.8.7 to 0.9.3 - Added by Viltér Panitz over 10 years ago

Felix,

Thanks for the help.

After the RubyGems' update I was able to update the rails' version.
But now I'm getting the error below:

rake db:migrate RAILS_ENV=production

(in C:/rails/rails_apps/redmine)
rake aborted!
A key is required to write a cookie containing the session data. Use config.acti
on_controller.session = { :key => "_myapp_session", :secret => "some secret phra
se" } in config/environment.rb

FULL TRACE

Invoke db:migrate (first_time)
Invoke environment (first_time)
Execute environment
rake aborted!
A key is required to write a cookie containing the session data. Use config.acti
on_controller.session = { :key => "_myapp_session", :secret => "some secret phra
se" } in config/environment.rb
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/sessio
n/cookie_store.rb:163:in `ensure_session_key'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/sessio
n/cookie_store.rb:74:in `initialize'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/middle
ware_stack.rb:72:in `new'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/middle
ware_stack.rb:72:in `build'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/middle
ware_stack.rb:116:in `build'
C:/rails/rails_apps/redmine/vendor/rails/activesupport/lib/active_support/inflec
tor.rb:361:in `inject'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/middle
ware_stack.rb:116:in `each'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/middle
ware_stack.rb:116:in `inject'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/middle
ware_stack.rb:116:in `build'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/dispat
cher.rb:130:in `build_middleware_stack'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/dispat
cher.rb:81:in `initialize'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/dispat
cher.rb:51:in `new'
C:/rails/rails_apps/redmine/vendor/rails/actionpack/lib/action_controller/dispat
cher.rb:51:in `run_prepare_callbacks'
C:/rails/rails_apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:6
31:in `prepare_dispatcher'
C:/rails/rails_apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:1
85:in `process'
C:/rails/rails_apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:1
13:in `send'
C:/rails/rails_apps/redmine/config/../vendor/rails/railties/lib/initializer.rb:1
13:in `run'
C:/rails/rails_apps/redmine/config/environment.rb:20
C:/rails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_origi
nal_require'
C:/rails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
C:/rails/rails_apps/redmine/vendor/rails/activesupport/lib/active_support/depend
encies.rb:156:in `require'
C:/rails/rails_apps/redmine/vendor/rails/activesupport/lib/active_support/depend
encies.rb:521:in `new_constants_in'
C:/rails/rails_apps/redmine/vendor/rails/activesupport/lib/active_support/depend
encies.rb:156:in `require'
C:/rails/rails_apps/redmine/vendor/rails/railties/lib/tasks/misc.rake:4
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_
call_chain'
C:/rails/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_
call_chain'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prere
quisites'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prere
quisites'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_
call_chain'
C:/rails/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_
call_chain'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task
'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_ex
ception_handling'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_ex
ception_handling'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/rails/ruby/bin/rake:19:in `load'
C:/rails/ruby/bin/rake:19

RE: Problems while Upgade 0.8.7 to 0.9.3 - Added by Felix Schäfer over 10 years ago

I think rake config/initializers/session_store.rb should take care of that.

RE: Problems while Upgade 0.8.7 to 0.9.3 - Added by Viltér Panitz over 10 years ago

Felix,

Thanks for the help. Every thing that you sad works fine.
I had to do other things until i could up my server.

But now i getting another error, while i'm migrating my data base.

I following the upgrade installation guide and a related link tha show how to upgrade 0.8.6 to 0.9.3, but my issue is not the same.

Would you mind in take a look once again?

This is my stack trace.

\rails\ruby\bin\rake db:migrate RAILS_ENV=production

AddViewIssuesPermission: migrating ======================================
rake aborted!
An error has occurred, all later migrations canceled:

Validation failed: Name is invalid

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

\rails\ruby\bin\rake db:migrate RAILS_ENV=production
--trace
(in C:/rails/rails_apps/redmine)
  • Invoke db:migrate (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute db:migrate
    AddViewIssuesPermission: migrating ======================================
    rake aborted!
    An error has occurred, all later migrations canceled:

Validation failed: Name is invalid
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/validati
ons.rb:1090:in `save_without_dirty!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/dirty.rb
:87:in `save_without_transactions!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:200:in `save!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/connecti
on_adapters/abstract/database_statements.rb:136:in `transaction'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:182:in `transaction'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:200:in `save!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:208:in `rollback_active_record_state!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:200:in `save!'
C:/rails/rails_apps/redmine/app/models/role.rb:65:in `add_permission!'
./db/migrate//20091114105931_add_view_issues_permission.rb:4:in `up_without_benc
hmarks'
./db/migrate//20091114105931_add_view_issues_permission.rb:3:in `each'
./db/migrate//20091114105931_add_view_issues_permission.rb:3:in `up_without_benc
hmarks'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:282:in `send'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:282:in `migrate'
C:/rails/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:282:in `migrate'
C:1:in `__send__'
C:1:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:486:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:562:in `call'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:562:in `ddl_transaction'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:485:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:472:in `each'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:472:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:400:in `up'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:383:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/railties/lib/tasks/databases.rake:116
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_
call_chain'
C:/rails/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_
call_chain'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task
'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_ex
ception_handling'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_ex
ception_handling'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/rails/ruby/bin/rake:19:in `load'
C:/rails/ruby/bin/rake:19

RE: Problems while Upgade 0.8.7 to 0.9.3 - Added by Felix Schäfer over 10 years ago

Either some files haven't been updated cleanly, or you have something in your DB that doesn't comply with newer validations, maybe a role name for example.

RE: Problems while Upgade 0.8.7 to 0.9.3 - Added by Viltér Panitz over 10 years ago

..... I still having problems.....

I backup everything, setup my oldest version (0.8.2), and start to upgrade versions. .... So I made the setup from 0.8.2 til 0.8.7 version. Everything works fine...But, when i try to upgrade to 0.9.3 something goes wrong.

So please, could you help me, because a sincerely don't know what to do anymore... :(

Below it's the error log:

AddViewIssuesPermission: migrating ======================================
rake aborted!
An error has occurred, all later migrations canceled:

Validation failed: Name is invalid

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

FULL LOG

rake db:migrate RAILS_ENV=production --trace
(in C:/rails/rails_apps/redmine)
  • Invoke db:migrate (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute db:migrate
    AddViewIssuesPermission: migrating ======================================
    rake aborted!
    An error has occurred, all later migrations canceled:

Validation failed: Name is invalid
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/validati
ons.rb:1090:in `save_without_dirty!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/dirty.rb
:87:in `save_without_transactions!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:200:in `save!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/connecti
on_adapters/abstract/database_statements.rb:136:in `transaction'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:182:in `transaction'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:200:in `save!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:208:in `rollback_active_record_state!'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/transact
ions.rb:200:in `save!'
C:/rails/rails_apps/redmine/app/models/role.rb:65:in `add_permission!'
./db/migrate//20091114105931_add_view_issues_permission.rb:4:in `up_without_benc
hmarks'
./db/migrate//20091114105931_add_view_issues_permission.rb:3:in `each'
./db/migrate//20091114105931_add_view_issues_permission.rb:3:in `up_without_benc
hmarks'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:282:in `send'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:282:in `migrate'
C:/rails/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:282:in `migrate'
C:1:in `__send__'
C:1:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:486:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:562:in `call'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:562:in `ddl_transaction'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:485:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:472:in `each'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:472:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:400:in `up'
C:/rails/rails_apps/redmine/vendor/rails/activerecord/lib/active_record/migratio
n.rb:383:in `migrate'
C:/rails/rails_apps/redmine/vendor/rails/railties/lib/tasks/databases.rake:116
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_
call_chain'
C:/rails/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_
call_chain'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task
'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_ex
ception_handling'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_ex
ception_handling'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/rails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/rails/ruby/bin/rake:19:in `load'
C:/rails/ruby/bin/rake:19

RE: Problems while Upgade 0.8.7 to 0.9.3 - Added by Felix Schäfer over 10 years ago

Do you have any plugin installed?

Have you had a look at what I have told you, i.e. see if all roles names you had before are still ok for the newer redmine?

RE: Problems while Upgade 0.8.7 to 0.9.3 - Added by Felix Schäfer over 10 years ago

I just also noticed you have quite old rack version, make sure all the needed gems are at the right version.

RE: Problems while Upgade 0.8.7 to 0.9.3 - Added by Viltér Panitz over 10 years ago

Yes, i have the timesheet. By the way i updated it and, redmine_mylyn_connector
Yes, i had. It updated in the moment you sad.

..I do something different: I downloaded all Redmine versions from 0.8.3 til 0.9.3 and start to update, but this time, without my data base. Was created a new data base for this test, and everything works fine.

I capture the log of migrate command to take a look at the tables and indexs created by that. I was looking the lines before my error, and I found something strange: the migrate script create the table permissions and permissions_roles, but when i go to my DB, this two tables doesn't exist.

This was logged by the migrate db

-- create_table("permissions", {:force=>true})
   -> 0.0150s
-- create_table("permissions_roles", {:force=>true, :id=>false})
   -> 0.0000s
-- add_index("permissions_roles", ["role_id"], {:name=>"permissions_roles_role_id"})
   -> 0.0160s

I attached the migrate log.

myLog.txt Magnifier (42.4 KB)

(1-9/9)