I've noticed that when I deploy to Heroku, javascript features dont work (such as Bootstrap Popover, Buttons, etc). I'm working with rails 3.2.2, ruby 1.9.3. The features work on localhost. There appear to be no errors displayed when deployed to Heroku (the features simply don't show up).
Any ideas? Thanks!
Listed on the Heroku reference page, the supported buildpacks offered are: Ruby, Node. js, Clojure, Python, Java, Gradle, Grails, Scala, Play, PHP, Go.
Build your app and run it locally Start your app locally using the heroku local command, which is installed as part of the Heroku CLI. Your app should now be running on http://localhost:5000/.
Heroku lets you deploy, run and manage applications written in Ruby, Node. js, Java, Python, Clojure, Scala, Go and PHP.
Manually precompiling worked for me.
bundle exec rake assets:precompile
before you push to heroku.
I had the exact same issue (I'm very new to Rails). I eventually solved the issue by rearranging the order of files within application.js:
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
For the javascripts to work in development, "require jquery" needed to be after "require twitter/bootstrap." In production, jquery needed to come first. Not sure what caused this, but it now works when deployed to Heroku.
I used these two posts:
javascript - Twitter bootstrap jquery plugins not compiled for production
twitter bootstrap drop down suddenly not working
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