Project

General

Profile

Actions

Bug #13171

closed

Plugins with /public/assets prevent Rails starting in development environment

Added by Dominic Cleal over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugin integration
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When a plugin is registered that has a /public/assets directory in its root, Rails can't start up in the development environment. This happens because the assets initialiser tries to serve the public/ directory.

/home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/actionpack-4.1.5/lib/action_dispatch/middleware/stack.rb:112:in `push': can't modify frozen Array (RuntimeError)
        from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/actionpack-4.1.5/lib/action_dispatch/middleware/stack.rb:112:in `use'
        from /home/dcleal/code/foreman/foreman/config/initializers/assets.rb:66:in `block (2 levels) in <top (required)>'
        from /home/dcleal/code/foreman/foreman/config/initializers/assets.rb:64:in `each'
        from /home/dcleal/code/foreman/foreman/config/initializers/assets.rb:64:in `block in <top (required)>'
        from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/railties-4.1.5/lib/rails/railtie.rb:210:in `instance_eval'
        from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/railties-4.1.5/lib/rails/railtie.rb:210:in `configure'
        from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/railties-4.1.5/lib/rails/railtie.rb:182:in `configure'
        from /home/dcleal/code/foreman/foreman/config/initializers/assets.rb:2:in `<top (required)>'

This can happen if you've used the plugin:assets:precompile rake task as used in packages.


Related issues 1 (0 open1 closed)

Related to Foreman - Refactor #12914: update rails configuration files to match to 4.1 syntaxClosedOhad Levy12/22/2015Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

  • Related to Refactor #12914: update rails configuration files to match to 4.1 syntax added
Actions #2

Updated by Ohad Levy about 8 years ago

the workaround is simply to delete the public/assets directory (as its generated via the assets precompile task).

Actions #3

Updated by The Foreman Bot about 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Eric Helms
  • Pull request https://github.com/theforeman/foreman/pull/3103 added
Actions #4

Updated by Eric Helms about 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF