padrino-framework: error occurred when I modify source code (padrino is running)

  ERROR -  ActiveSupport::Concern::MultipleIncludedBlocks - Cannot define multiple 'included' blocks for a Concern:
 /home/ssut/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-4.1.0/lib/active_support/concern.rb:126:in `included'
  ERROR -  Failed to load /home/ssut/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-4.1.0/lib/active_support/logger_silence.rb; removing partially defined constants
  ERROR -  ActiveSupport::Concern::MultipleIncludedBlocks - Cannot define multiple 'included' blocks for a Concern:
 /home/ssut/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-4.1.0/lib/active_support/concern.rb:126:in `included'

An error occurred when I modify source code. *prerequisite: padrino is running and reload option is on.

About this issue

  • Original URL
  • State: open
  • Created 10 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

okay, ive a fix, can someone verify that this works with few rspec? 😃

it detects reloading of concern file, then find all models that include the file, and try to locate the file for reload, and remove the constant from session, and finally load it in the end

https://gist.github.com/u007/47b2f021670d54f862624ae70494a085

It works, thanks!

okay, ive a fix, can someone verify that this works with few rspec? 😃

it detects reloading of concern file, then find all models that include the file, and try to locate the file for reload, and remove the constant from session, and finally load it in the end

https://gist.github.com/u007/47b2f021670d54f862624ae70494a085