Defect #19151
closedUpgrade from 2.6 to 3.0 failed.
0%
Description
When I use this command ``bundle exec rake db:migrate RAILS_ENV=production``, it's crashed.
Here is what I see:
```
root@iotdemo:/usr/local/redmine# bundle exec rake db:migrate RAILS_ENV=production
rake aborted!
ArgumentError: The scope body needs to be callable.
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/scoping/named.rb:143:in `scope'
/usr/local/redmine/plugins/redmine_agile/lib/redmine_agile/patches/issue_patch.rb:33:in `block in included'
/usr/local/redmine/plugins/redmine_agile/lib/redmine_agile/patches/issue_patch.rb:29:in `class_eval'
/usr/local/redmine/plugins/redmine_agile/lib/redmine_agile/patches/issue_patch.rb:29:in `included'
/usr/local/redmine/plugins/redmine_agile/lib/redmine_agile/patches/issue_patch.rb:50:in `include'
/usr/local/redmine/plugins/redmine_agile/lib/redmine_agile/patches/issue_patch.rb:50:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/redmine/plugins/redmine_agile/lib/redmine_agile.rb:26:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/redmine/plugins/redmine_agile/init.rb:55:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/redmine/lib/redmine/plugin.rb:155:in `block in load'
/usr/local/redmine/lib/redmine/plugin.rb:146:in `each'
/usr/local/redmine/lib/redmine/plugin.rb:146:in `load'
/usr/local/redmine/config/initializers/30-redmine.rb:21:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/engine.rb:652:in `block in load_config_initializer'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in `instrument'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/engine.rb:651:in `load_config_initializer'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/engine.rb:615:in `each'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/engine.rb:615:in `block in <class:Engine>'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `each'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `tsort_each_child'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
/usr/local/redmine/config/environment.rb:14:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/application.rb:328:in `require_environment!'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/application.rb:443:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
```
And when I change my ruby version to 2.2 use rvm, also this problem. Please help, thanks.
Updated by Feng Yu almost 10 years ago
Edit: I find that some plugins not support, so remove.
But at last it throw an exception at start page.
```
Started GET "/redmine" for 106.36.219.240 at 2015-02-23 11:17:33 +0800
Processing by WelcomeController#index as HTML
Current user: fengyu (id=3)
Rendered news/_news.html.erb (11.2ms)
Rendered welcome/index.html.erb within layouts/base (25.3ms)
Rendered plugins/redmine_wiki_extensions/app/views/wiki_extensions/_html_header.html.erb (0.1ms)
Rendered plugins/redmine_sticky_messages/app/views/messages/_after_top_menu.html.erb (4.6ms)
Completed 500 Internal Server Error in 95ms
ActiveRecord::RecordNotFound (Couldn't find all News with 'id': (all, {:limit=>2, :order=>"created_on desc", :include=>[:author]}) (found 0 results, but was looking for 2)):
lib/redmine/hook.rb:119:in `block (2 levels) in render_on'
lib/redmine/hook.rb:117:in `map'
lib/redmine/hook.rb:117:in `block in render_on'
lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
lib/redmine/hook.rb:61:in `each'
lib/redmine/hook.rb:61:in `block in call_hook'
lib/redmine/hook.rb:58:in `tap'
lib/redmine/hook.rb:58:in `call_hook'
lib/redmine/hook.rb:167:in `call_hook'
app/views/layouts/base.html.erb:75:in `_app_views_layouts_base_html_erb___4281145468893068648_35434060'
```
Updated by Toshi MARUYAMA almost 10 years ago
- Status changed from New to Needs feedback
- redmine_sticky_messages
- redmine_wiki_extensions
Updated by Feng Yu almost 10 years ago
Toshi MARUYAMA wrote:
You still use plugins.
- redmine_sticky_messages
- redmine_wiki_extensions
Thank you, and you're right. I update the redmine_wiki_extensions and remove redmine_sticky_messages(still not working for redmine 3.0). It works.
But the activity page return 500 error. Here is my log:
Started GET "/redmine/projects/hawkeyes/activity" for 106.36.219.240 at 2015-02-23 21:36:15 +0800 Processing by ActivitiesController#index as HTML Parameters: {"id"=>"hawkeyes"} Current user: fengyu (id=3) Completed 500 Internal Server Error in 25ms NoMethodError (undefined method `[]' for nil:NilClass): lib/redmine/activity/fetcher.rb:43:in `block (2 levels) in event_types' lib/redmine/activity/fetcher.rb:42:in `each' lib/redmine/activity/fetcher.rb:42:in `block in event_types' lib/redmine/activity/fetcher.rb:40:in `select' lib/redmine/activity/fetcher.rb:40:in `event_types' lib/redmine/activity/fetcher.rb:30:in `initialize' app/controllers/activities_controller.rb:37:in `new' app/controllers/activities_controller.rb:37:in `index'
Please help. Thanks.
Updated by Feng Yu almost 10 years ago
My god. Solved this issue. It seems that the plugin redmine_wiki_extensions still not working for redmine 3.0. Ah... Much plugins maybe not support redmine 3.0 for now.
I almost removed all plugins except redmine_agile(Only this plugins can work).
Thanks.
Updated by Toshi MARUYAMA almost 10 years ago
- Status changed from Needs feedback to Closed
- Resolution set to Invalid
Thank you for your feedback.
Updated by Fabien Camous almost 10 years ago
Hello,
Trying to install redmine_agile on redmine 3.0.0.stable.14068 get me the exact same error message as in the initial description, but it has been done on a fresh (new virtual machine) redmine installation without any plugin. I'm far to be an expert in ruby/rails so I'm a little bit lost. Any help appreciated. As a fallback, I might downgrade to redmine 2.6.x (I'm coming from redmine 2.3.x) :(
XXXXXX@XXXXXXXXX:/usr/share/redmine# bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production rake aborted! Argum entError: The scope body needs to be callable. /usr/local/rvm/gems/ruby-2.2.0/gems/activerecord-4.2.0/lib/active_record/scoping/named.rb:143:in `scope' /usr/share/redmine/plugins/redmine_agile/lib/redmine_agile/patches/issue_patch.rb:33:in `block in included' /usr/share/redmine/plugins/redmine_agile/lib/redmine_agile/patches/issue_patch.rb:29:in `class_eval' /usr/share/redmine/plugins/redmine_agile/lib/redmine_agile/patches/issue_patch.rb:29:in `included' ...
Environment: Redmine version 3.0.0.stable.14068 Ruby version 2.2.0-p0 (2014-12-25) [x86_64-linux] Rails version 4.2.0 Environment production Database adapter Mysql2 SCM: Subversion 1.8.8 Filesystem Redmine plugins: no plugin installed
Updated by Toshi MARUYAMA almost 10 years ago
Fabien Camous wrote:
Trying to install redmine_agile on redmine 3.0.0.stable.14068 ...
Please contact plugin author.
Updated by Fabien Camous almost 10 years ago
as I expected :/
feng yu was more lucky with ruby 2.1.5
Hello Fabien, You may use redmine 3.0-stable, but with ruby 2.0.0, not higher. We are working on compatibility of our plugins with the latest versions of ruby and rails, but now I can't say when we will release new versions which will be compatible with ruby 2.2. Regards, Irina support at redminecrm.com
Updated by Feng Yu almost 10 years ago
Not only that. Finally I change ruby version to 2.2, it can also work.
Because I find here: http://www.redmine.org/projects/redmine/wiki/RedmineInstall
Redmine 3.0 can support ruby 2.2.
Updated by Fabien Camous almost 10 years ago
agreed, however on redminecrm web site, they clearly said that only these versions of ruby are currently supported :http://www.redminecrm.com/projects/agile/pages/1
Ruby: 1.8.7, 1.9.3, 2.0.0 Database: SQLite, MySQL, PostgreSQL, MS SQL
Feng Yu> can you confirm that you've succeed to make redmine 3.0.0 & redmine_agile plugin worked on ruby > 2.0 (in your case 2.1.5) ?
Updated by Feng Yu almost 10 years ago
Fabien Camous wrote:
agreed, however on redminecrm web site, they clearly said that only these versions of ruby are currently supported :http://www.redminecrm.com/projects/agile/pages/1
[...]
Feng Yu> can you confirm that you've succeed to make redmine 3.0.0 & redmine_agile plugin worked on ruby > 2.0 (in your case 2.1.5) ?
Of course. redmine_agile plugin can work very well.
Environment:
Redmine version 3.0.0.stable
Ruby version 2.2.0-p0 (2014-12-25) [x86_64-linux]
Rails version 4.2.0
Environment production
Database adapter Mysql2
SCM:
Git 2.3.2
Filesystem
Redmine plugins:
redmine_agile 1.3.7
Updated by Fabien Camous almost 10 years ago
:(
I'm sad, I was pushing an old version of redmine_agile (light) 1.3.5, downloaded latest one 1.3.8 make the setup working fine on ruby 2.2.0
thanks for pointing out that it was working for you and that I've double check then my version :)
many thanks for your help & really quick answers !
Updated by Shreyas Moolya about 8 years ago
Toshi MARUYAMA wrote:
Thank you for your feedback.
when i try to run rake redmine:plugins:migrate RAILS_ENV=production
redmine_re plugin i get the following error
ArgumentError: The scope body needs to be callable.
C:/Sites/redmine/plugins/redmine_re/app/models/re_artifact_properties.rb:6:in `<
class:ReArtifactProperties>'
The re_artifact_properties.rb has
scope :without_projects, :conditions => ["artifact_type != ?", 'Project']
with class ReArtifactProperties
I tried running rake command with scope :without_projects, {:conditions => ["artifact_type != ?", 'Project']}
but still i get the same error.
I use the following plugins:
easy_wbs
issue_charts
redcase
redmine_code_review
redmine_dashboard
redmine_image_clipboard_paste
redmine_issue_evm
redmine_re
redmine_remote_revision_url
redmine_sidebar_toc
redmine_subtask_list_accordion
Kindly help
Updated by Marius BÄ‚LTEANU about 8 years ago
Shreyas Moolya wrote:
Toshi MARUYAMA wrote:
Thank you for your feedback.
when i try to run rake redmine:plugins:migrate RAILS_ENV=production
redmine_re plugin i get the following error
You should contact plugin author. Here you'll receive support only for Redmine core (without any plugin installed).