spree/spree — Issue #1050: ActionView::Template::Error (admin/orders/edit_form.js isn't precompiled)
Author: hoverlover
Created: 2012-01-30 02:07:19+00:00
State: open

Spree version 1.0.0.rc2:

I get this error in production on Heroku unless I duplicate [this](https://github.com/spree/spree/blob/master/core/lib/spree/core/engine.rb#L74) line in my `config/envrionments/production.rb` file. It doesn't make sense to me, because without this line duplicated in `config/environments/production.rb`, I can go into `rails console` and inspect `Rails.application.config.assets.precompile` and I can see all of these files that the spree engine adds. But without it, I get this when trying to access the admin edit order view (`admin/orders/R544001248/edit`):

2012-01-29T23:29:22+00:00 app[web.1]: ActionView::Template::Error (admin/orders/edit_form.js isn't precompiled):
2012-01-29T23:29:22+00:00 app[web.1]: 53: <%= render 'spree/admin/shared/update_order_state.js' %>
2012-01-29T23:29:22+00:00 app[web.1]: 52: <%= javascript_tag do -%>
2012-01-29T23:29:22+00:00 app[web.1]: 54: <% end -%>
2012-01-29T23:29:22+00:00 app[web.1]: 56: <%= javascript_include_tag 'admin/orders/edit_form' %>
2012-01-29T23:29:22+00:00 app[web.1]: 55:

This is running on Heroku, with compiled assets pushed to S3. I've verified that the `admin/orders/edit_form.js` asset is present on S3. Like I said, I can work around it by duplicating this config line, but I would like to know for my own sanity why this is needed, and if it's a bug or not.