Can't load .css asset of bootstrap-wysihtml5 in production env #1312

alpracka opened this Issue Sep 9, 2012 · 4 comments


None yet
5 participants

alpracka commented Sep 9, 2012


today I've implemented bootstrap-wysihtml5 in these steps:

  1. add gem 'bootstrap-wysihtml5-rails' into Gemfile
  2. configured model field in /initializers/rails_admin.rb:
config.model Message do
    edit do
      field :text do
        bootstrap_wysihtml5 true
  1. it works in dev mode
  2. but it doesn't work in production. Somehow it cant load CSS. Error message in Chrome:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

I guess there is a problem with asset precompilation, but I don't know how to solve it. Thanks for help.

Best regards, Nikos


dexion commented Sep 13, 2012

If you have bootstrap-wysihtml5.css in your app/assets folder (else copy them) then add in ./config/environments/production.rb string for precompilation for this file. See comments in that (production.rb) file for more information.


brewster1134 commented Sep 18, 2012

I submit a pull request to better handle asset precompilaton. i think it is a better solution than manually managing vendored assets into your app.



mshibuya commented Sep 19, 2012

Asset compilation issue is the problem which should be handled in bootstrap-wysihtml5-rails. It should hook Rails Engine's initializer and add asset files to be precompiled, like RailsAdmin and ckeditor-rails does.

For now, you can force compilation of bootstrap-wysihtml5 assets by adding

config.assets.precompile += ['bootstrap-wysihtml5.css', 'bootstrap-wysihtml5-all.js']

to your app's config/environments/*.rb for workaround.


taavo commented Dec 3, 2012

Fixed in bootstrap-wysiwyg-rails per mshibuya's suggestion. This issue should be closed.

mshibuya closed this Feb 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment