简体   繁体   中英

Error trying use mercury wysiwyg editor in rails 3.1 app on Heroku?

I have a working rails 3.1 application that uses the mercury wysiwyg editor, however I can't get it working when pushing to heroku (cedar stack). The application runs until attempting to edit a page, when the error is as follows:

ActionView::Template::Error (mercury.css isn't precompiled)

Note that I have precompiled the asset pipeline for production deployment, the rest of the app runs as expected.

Appreciate insight from anyone else that has managed to work through the problem!

I finally figured it out....

In the file config/environments/production.rb add this in the YourAppName::Application.configure do block...

config.assets.precompile += %w( mercury.js mercury.css mercury_overrides.css )

There is a commented out section for config.assets.precompile that describes it.

Basically, mercury-rails isn't adding the js/css to the asset list for precompile.

I filed issue #73 for mercury about this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM