Question

I'm using Rails on Heroku Cedar stack and it's not throwing any issues while compiling the assets but then I get a 500 internal server error:

2012-06-25T23:22:59+00:00 app[web.1]: ActionView::Template::Error (bootstrap-datepicker.js isn't precompiled):

Any idea what might be causing this? This is the javascript file I'm including (except I downloaded it locally) https://github.com/eternicode/bootstrap-datepicker/blob/master/js/bootstrap-datepicker.js

I'm including it in my application.html.erb like so:

<%= javascript_include_tag "bootstrap-datepicker" %>

Is it because its not a coffeescript file? Any help is appreciated!

Was it helpful?

Solution

I figured it out. I had to add it to production.rb in config.assets.precompile

In production.rb I added it to my config.assets.precompile:

config.assets.precompile += %w( jquery.dataTables.min.js jquery-ui-1.8.21.custom.min.js jquery-ui-1.8.21.custom.css bootstrap-datepicker.js fullcalendar.js)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top