Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku *.js isn't precompiled error

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!

like image 805
turbo2oh Avatar asked Jun 25 '12 23:06

turbo2oh


1 Answers

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)
like image 94
turbo2oh Avatar answered Nov 08 '22 05:11

turbo2oh