I'm using the jquery-ui-rails gem. It works fine on local host, but when I push to heroku it gives heroku logs shows this:
2012-04-11T02:28:59+00:00 app[web.1]: ActionView::Template::Error (couldn't find file 'jquery.ui.slider'
2012-04-11T02:28:59+00:00 app[web.1]: (in /app/app/assets/stylesheets/application.css:12)):
My production config file:
config.cache_classes = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_assets = true
config.assets.compress = true
config.assets.compile = true
config.assets.digest = true
Some questions online say to change config.assets.compile
to false, but when I do that I get a application.css not precompiled
error.
Taking the line gem jquery-ui-rails
out of the assets
group in the Gemfile seems to help. Similar problem/fix for the twitter bootstrap gem. :)
I had a similar, though not identical, problem. In my case, drag and drop methods worked locally, but Heroku complained that it couldn't find jquery-ui.
What solved it for me was this:
In the Gemfile, added
gem 'jquery-ui-rails'
In application.js, added
//= require jquery.ui.all
In application.css, added
*= require jquery.ui.all
Finally, of course, git commit -a -m "added jquery ui statements"
, followed by git push heroku master
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With