Heroku *.js isn't precompiled error
Asked Answered
B

1

11

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!

Batson answered 25/6, 2012 at 23:28 Comment(0)
B
21

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)
Batson answered 26/6, 2012 at 0:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.