Heroku can't find jquery.ui when using jquery-ui-rails gem in production
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
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.