Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActiveAdmin Precompile Error on Heroku

Hello I recently push an update up to Heroku and all of a sudden Active Admin won't precompile. Giving me this error.

Running: rake assets:precompile
       rake aborted!
       SyntaxError: cannot return a value from a constructor: "this" in class DropdownMenu
       (in /tmp/build_etr05wkfpnxp/vendor/bundle/ruby/1.9.1/gems/activeadmin-0.5.1/app/assets/javascripts/active_admin/components/jquery.aa.dropdown-menu.js.cof
fee)
       /tmp/build_etr05wkfpnxp/vendor/bundle/ruby/1.9.1/gems/execjs-
1.4.0/lib/execjs/external_runtime.rb:66:in `extract_result'

No clue what happened or how to fix it. It work perfectly fine on my localhost, only happens when I push to heroku. It also worked fine on Heroku before, all I did was add a model to it.

Any ideas?

Thanks!

FIX

https://github.com/gregbell/active_admin/issues/1939

like image 447
Dan Avatar asked Feb 26 '13 04:02

Dan


1 Answers

Fix can be found here

https://github.com/gregbell/active_admin/issues/1939

in Gemfile add the coffee-script-source line.

group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'coffee-script-source', '~> 1.4.0' # ADD THIS LINE, 1.5.0 doesn't compile ActiveAdmin JavaScript files
gem 'uglifier'
end
like image 72
Dan Avatar answered Oct 11 '22 13:10

Dan