I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Bug #2382

Error NoMethodError: undefined method `after_move'

Added by Minh Thien over 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Major
Assignee:
Category:
-
Target version:
Start date:
18 May 2015
Due date:
21 Dec 2017
% Done:

100%

Redmine version:
3.0.x, 3.4.x
External issue:

Description

Hi,

Please fix it !

This plugin generate a error when I install on the system :

Environment:
  Redmine version                3.0.3.stable
  Ruby version                   2.2.2-p95 (2015-04-13) [x86_64-linux]
  Rails version                  4.2.1
  Environment                    production
  Database adapter               Mysql2

$ rake redmine:plugins:migrate RAILS_ENV=production
(in /var/www/redmine)
rake aborted!
NoMethodError: undefined method `after_move' for #<Class:0x0000000626fba0>
/usr/local/rvm/gems/ruby-2.2.2/gems/activerecord-4.2.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/var/www/redmine/plugins/project_section/lib/section_project_patch.rb:15:in `block in included'
/var/www/redmine/plugins/project_section/lib/section_project_patch.rb:7:in `class_eval'
/var/www/redmine/plugins/project_section/lib/section_project_patch.rb:7:in `included'

Associated revisions

Revision 26 (diff)
Added by Andriy Lesyuk about 8 years ago

Quick fix for awesome_nested_set’s after_move (#2382)

Revision 33 (diff)
Added by Andriy Lesyuk about 7 years ago

Added Gemfile

Revision 34 (diff)
Added by Andriy Lesyuk about 7 years ago

Updates for Redmine 3.4

History

#1 Updated by Andriy Lesyuk about 9 years ago

  • Description updated (diff)
  • Status changed from New to Open
  • Priority changed from Critical to Major

#2 Updated by Adnan Topçu about 9 years ago

+1

#3 Updated by Corey Sewell almost 9 years ago

+1

#4 Updated by Andriy Lesyuk over 8 years ago

Just a note for now: #after_move is provided by awesome_nested_set, which is used by Redmine. Looks like it was dropped/replaced.

#5 Updated by Andriy Lesyuk about 8 years ago

  • Status changed from Open to In Progress

#6 Updated by Andriy Lesyuk about 8 years ago

Redmine switched from awesome_nested_set to an own implementation here (see #18860).

#7 Updated by Andriy Lesyuk about 8 years ago

  • % Done changed from 0 to 50

#8 Updated by Bruno Spyckerelle over 7 years ago

Hello,
I tried last revision (28) of your plugin with Redmine 3.3, but unfortunately this doesn’t seem to work :

Started GET "/redmine/projects" for 127.0.0.1 at 2017-04-03 14:20:24 +0200
Processing by ProjectsController#index as HTML
  Current user: admin (id=1)
  Rendered projects/index.html.erb within layouts/base (8.9ms)
Completed 500 Internal Server Error in 50ms (ActiveRecord: 36.8ms)

LoadError (cannot load such file -- awesome_nested_set):
  plugins/project_section/app/models/project_section.rb:1:in `<top (required)>'
  plugins/project_section/lib/section_projects_helper_patch.rb:18:in `render_project_hierarchy_with_sections'
  app/views/projects/index.html.erb:12:in `_b9410e0d15b3e45b2b995de4b7f6cf88'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Versions :

Environment:
  Redmine version                3.3.2.stable.16334
  Ruby version                   2.3.3-p222 (2016-11-21) [x86_64-linux]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               Mysql2

#9 Updated by Allan Vig over 7 years ago

Hi,

Having the same issue as Bruno. Any progress or workaround?

Regards - Allan

#10 Updated by Andriy Lesyuk about 7 years ago

Bruno, Allan, this means, that you need to install awesome_nested_set gem. It was a part of Redmine package before, but now needs to be installed separately.

#11 Updated by Andriy Lesyuk about 7 years ago

  • Redmine version changed from 3.0.3 to 3.0.x, 3.4.x

Got the following error, when adding a subproject, under Redmine 3.4:

App 15986 stderr: Completed 500 Internal Server Error in 907ms (ActiveRecord: 259.1ms)
App 15986 stderr: 
App 15986 stderr: SystemStackError (stack level too deep):
App 15986 stderr:   lib/redmine/nested_set/project_nested_set.rb:125:in `lock_nested_set'
App 15986 stderr:   lib/redmine/nested_set/project_nested_set.rb:60:in `move_in_nested_set'
App 15986 stderr:   plugins/project_section/lib/section_project_patch.rb:79:in `update_descendants'

#12 Updated by Andriy Lesyuk about 7 years ago

Similar on Redmine 3.3:

Completed 500 Internal Server Error in 2114ms (ActiveRecord: 741.6ms)

SystemStackError (stack level too deep):
  lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb:30:in `block in acts_as_customizable'
  lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb:142:in `block in save_custom_field_values'
  lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb:134:in `each'
  lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb:134:in `save_custom_field_values'
  plugins/project_section/lib/section_project_patch.rb:79:in `update_descendants'

#13 Updated by Andriy Lesyuk about 7 years ago

  • Due date set to 21 Dec 2017
  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

I thought about switching to Redmine’s “nested set”. This would require adding some code to Section, what is not needed if awesome_nested_set is used. Therefore, I was not sure. Eventually, I decided to continue with the awesome_nested_set Ruby gem. Maybe, in future, I will switch to Redmine’s implementation, but, to be honest, do not see any reasons for this (except avoiding dependency on third-party gem).

The last issue was fixed in r34.

Also available in: Atom PDF

Terms of use | Privacy policy