2

my app on heroku shows this error:

ActionView::Template::Error (highcharts.js isn't precompiled):

I tried two solutions I found on internet

config.assets.initialize_on_precompile = false

and

config.assets.compile = true

I read a post (I don't remember which) and create de heroku with this command:

heroku create --stack cedar

also when I run heroku open I got this error:

enter image description here

here is my heroku logs

....
2012-08-08T21:03:41+00:00 app[web.1]: ActionView::Template::Error (highcharts.js isn't precompiled):
2012-08-08T21:03:41+00:00 app[web.1]: 
2012-08-08T21:03:41+00:00 app[web.1]:     5:   <%= stylesheet_link_tag    "application", :media => "all" %>
2012-08-08T21:03:41+00:00 app[web.1]:     6:   <%= javascript_include_tag "application" %>
2012-08-08T21:03:41+00:00 app[web.1]:     7:   <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"  %>
2012-08-08T21:03:41+00:00 app[web.1]:     8:   <%= javascript_include_tag :highcharts %>
2012-08-08T21:03:41+00:00 app[web.1]:     10: </head>
2012-08-08T21:03:41+00:00 app[web.1]:     11: <body>
2012-08-08T21:03:41+00:00 app[web.1]:     9:   <%= csrf_meta_tags %>
2012-08-08T21:03:41+00:00 app[web.1]:   app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb___4426161850966429466_47229900'
2012-08-08T21:03:41+00:00 heroku[router]: GET floating-forest-7331.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=4010ms status=304 bytes=0
....

EDIT if you wanna see my app (I would appreciate that you check it) here is my github

Asantoya17
  • 4,465
  • 6
  • 23
  • 29
  • I found this [possible solution](http://stackoverflow.com/questions/11198856/heroku-js-isnt-precompiled-error/11873883#11873883) but really I don't understand so much – Asantoya17 Aug 08 '12 at 22:12

1 Answers1

0

Please, try:

RAILS_ENV=production bundle exec rake assets:precompile

Then add the created folder ./public/assets/ to your Git repository and push to Heroku.


If rake will try to connect to your database, add in your ./config/application.rb:

config.assets.initialize_on_precompile = false

Precompiling Assets @ guides.rubyonrails.org

Edward Ruchevits
  • 6,411
  • 12
  • 51
  • 86