RAILS_ENV=production rake db:migrate and rake generate_secret_token throws bunch of errors

Added by alaca kala over 6 years ago

Hi

I am installing the latest one and using my prev database(redmine2) and I am getting bunch of errors that I cannot make sense at all. I am hoping that someone might eb able to help me.

I am under Debian Squeeze 32bit using Ruby1.9.1 wit apache passenger

RAILS_ENV=production rake db:migrate
(in /var/www/redmine_manual)
rake aborted!
uninitialized constant Rake::DSL
/usr/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/tasklib.rb:8:in `<class:TaskLib>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/tasklib.rb:6:in `<module:Rake>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/tasklib.rb:3:in `<top (required)>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/testtask.rb:4:in `require'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/testtask.rb:4:in `<top (required)>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/test_unit/testing.rake:2:in `require'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/test_unit/testing.rake:2:in `<top (required)>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/test_unit/railtie.rb:12:in `load'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/test_unit/railtie.rb:12:in `block in <class:TestUnitRailtie>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `instance_exec'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `block in load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `each'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:423:in `block in load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/railties.rb:8:in `each'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/railties.rb:8:in `all'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:423:in `load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:145:in `load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/redmine_manual/Rakefile:7:in `<top (required)>'
/usr/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/bin/rake:31:in `<main>'

rake generate_secret_token
(in /var/www/redmine_manual)
rake aborted!
uninitialized constant Rake::DSL
/usr/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/tasklib.rb:8:in `<class:TaskLib>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/tasklib.rb:6:in `<module:Rake>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/tasklib.rb:3:in `<top (required)>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/testtask.rb:4:in `require'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/rake-10.1.0/lib/rake/testtask.rb:4:in `<top (required)>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/test_unit/testing.rake:2:in `require'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/test_unit/testing.rake:2:in `<top (required)>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/test_unit/railtie.rb:12:in `load'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/test_unit/railtie.rb:12:in `block in <class:TestUnitRailtie>'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `instance_exec'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `block in load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `each'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:423:in `block in load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/railties.rb:8:in `each'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/railties.rb:8:in `all'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:423:in `load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:145:in `load_tasks'
/var/www/redmine_manual/vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/redmine_manual/Rakefile:7:in `<top (required)>'
/usr/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/bin/rake:31:in `<main>'

log/production.log

Completed 500 Internal Server Error in 5ms
ActiveRecord::StatementInvalid (Mysql2::Error: Unknown column 'projects.inherit_members' in 'field list': SELECT `news`.`id` AS t0_r0, `news`.`project_id` AS t0_r1, `news`.`title` AS t0_r2, `news`.`summary` AS t0_r3, `news`.`description` AS t0_r4, `news`.`author_id` AS t0_r5, `news`.`created_on` AS t0_r6, `news`.`comments_count` AS t0_r7, `projects`.`id` AS t1_r0, `projects`.`name` AS t1_r1, `projects`.`description` AS t1_r2, `projects`.`homepage` AS t1_r3, `projects`.`is_public` AS t1_r4, `projects`.`parent_id` AS t1_r5, `projects`.`created_on` AS t1_r6, `projects`.`updated_on` AS t1_r7, `projects`.`identifier` AS t1_r8, `projects`.`status` AS t1_r9, `projects`.`lft` AS t1_r10, `projects`.`rgt` AS t1_r11, `projects`.`contact_id` AS t1_r12, `projects`.`inherit_members` AS t1_r13, `users`.`id` AS t2_r0, `users`.`login` AS t2_r1, `users`.`hashed_password` AS t2_r2, `users`.`firstname` AS t2_r3, `users`.`lastname` AS t2_r4, `users`.`mail` AS t2_r5, `users`.`admin` AS t2_r6, `users`.`status` AS t2_r7, `users`.`last_login_on` AS t2_r8, `users`.`language` AS t2_r9, `users`.`auth_source_id` AS t2_r10, `users`.`created_on` AS t2_r11, `users`.`updated_on` AS t2_r12, `users`.`type` AS t2_r13, `users`.`identity_url` AS t2_r14, `users`.`mail_notification` AS t2_r15, `users`.`salt` AS t2_r16, `users`.`must_change_passwd` AS t2_r17 FROM `news` LEFT OUTER JOIN `projects` ON `projects`.`id` = `news`.`project_id` LEFT OUTER JOIN `users` ON `users`.`id` = `news`.`author_id` AND `users`.`type` IN ('User', 'AnonymousUser') WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='news')) ORDER BY news.created_on DESC LIMIT 5):
app/models/news.rb:59:in `latest'
app/controllers/welcome_controller.rb:22:in `index'

Replies (1)

RE: RAILS_ENV=production rake db:migrate and rake generate_secret_token throws bunch of errors - Added by alaca kala over 6 years ago

Ohh well, nevermind.

I ahd to give the full path to the rake like this "/var/lib/gems/1.9.1/bin/rake". Somehow direct calling was dumping error.

(1-1/1)