Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin/address_states.js isn't precompiled #754

Closed
lukasvotypka opened this issue Nov 12, 2011 · 17 comments
Closed

admin/address_states.js isn't precompiled #754

lukasvotypka opened this issue Nov 12, 2011 · 17 comments

Comments

@lukasvotypka
Copy link

This error return when I go to order -> customer details

Started GET "/admin/orders/R056178288/user" for 89.173.150.167 at 2011-11-12 13:42:41 +0100
  Processing by Admin::OrdersController#user as HTML
  Parameters: {"id"=>"R056178288"}
Rendered /usr/home/spisakriding/app/shared/bundle/ruby/1.9.1/bundler/gems/spree-54ac9f4bf563/core/app/views/admin/shared/_order_tabs.html.erb (6.7ms)
Rendered /usr/home/spisakriding/app/shared/bundle/ruby/1.9.1/bundler/gems/spree-54ac9f4bf563/core/app/views/shared/_error_messages.html.erb (0.1ms)
Rendered /usr/home/spisakriding/app/shared/bundle/ruby/1.9.1/bundler/gems/spree-54ac9f4bf563/core/app/views/admin/shared/_address_form.html.erb (33.0ms)
Rendered /usr/home/spisakriding/app/shared/bundle/ruby/1.9.1/bundler/gems/spree-54ac9f4bf563/core/app/views/admin/shared/_address_form.html.erb (20.4ms)
Rendered /usr/home/spisakriding/app/shared/bundle/ruby/1.9.1/bundler/gems/spree-54ac9f4bf563/core/app/views/admin/orders/_user_form.html.erb (68.4ms)
Rendered /usr/home/spisakriding/app/shared/bundle/ruby/1.9.1/bundler/gems/spree-54ac9f4bf563/core/app/views/admin/orders/user.html.erb within layouts/admin (82.6ms)
Completed 500 Internal Server Error in 223ms

ActionView::Template::Error (admin/address_states.js isn't precompiled):
    43: </p>
    44: 
    45: <% content_for :head do %>
    46:   <%= javascript_include_tag '/states.js', 'admin/address_states.js' %>
    47: <% end %>

I fix it with adding assets.precompile in config/application.rb.

config.assets.precompile += ['admin/address_states.js']
@radar
Copy link
Contributor

radar commented Nov 14, 2011

Which version of Spree are you using? We'll need to know to duplicate this issue.

@lukasvotypka
Copy link
Author

I use spree 0.70.

My gem list is below:

Gems included by the bundle:
  * actionmailer (3.1.1)
  * actionpack (3.1.1)
  * activemerchant (1.17.0)
  * activemodel (3.1.1)
  * activerecord (3.1.1)
  * activeresource (3.1.1)
  * activesupport (3.1.1)
  * acts_as_list (0.1.4)
  * ansi (1.4.0)
  * archive-tar-minitar (0.5.2)
  * arel (2.2.1)
  * bcrypt-ruby (3.0.1)
  * braintree (2.13.0)
  * builder (3.0.0)
  * bundler (1.0.18)
  * cancan (1.6.5)
  * cocaine (0.2.0)
  * coffee-rails (3.1.1)
  * coffee-script (2.2.0)
  * coffee-script-source (1.1.2)
  * columnize (0.3.4)
  * deface (0.7.1)
  * devise (1.4.7)
  * dynamic_form (1.1.4)
  * erubis (2.7.0)
  * execjs (1.2.9)
  * faker (1.0.0)
  * formtastic (2.0.2)
  * highline (1.6.2)
  * hike (1.2.1)
  * i18n (0.6.0)
  * jquery-rails (1.0.16)
  * json (1.6.1)
  * kaminari (0.12.4)
  * linecache19 (0.5.12)
  * mail (2.3.0)
  * meta_search (1.1.1)
  * mime-types (1.17.2)
  * minitest (2.7.0)
  * multi_json (1.0.3)
  * mysql2 (0.3.6)
  * nested_set (1.6.8)
  * nokogiri (1.5.0)
  * orm_adapter (0.0.5)
  * paperclip (2.4.1)
  * polyamorous (0.5.0)
  * polyglot (0.3.3)
  * rack (1.3.5)
  * rack-cache (1.1)
  * rack-mount (0.8.3)
  * rack-ssl (1.3.2)
  * rack-test (0.6.1)
  * rails (3.1.1)
  * rails-i18n (0.1.10 f7d8fa7)
  * railties (3.1.1)
  * rake (0.9.2.2)
  * rd_find_by_param (0.1.1)
  * rd_resource_controller (1.0.1)
  * rdoc (3.11)
  * ruby-debug-base19 (0.11.24)
  * ruby-debug-ide19 (0.4.12)
  * ruby-debug19 (0.11.6)
  * ruby-ole (1.2.11.2)
  * ruby_core_source (0.1.5)
  * sass (3.1.10)
  * sass-rails (3.1.4)
  * spreadsheet (0.6.5.9)
  * spree (0.70.0 54ac9f4)
  * spree_api (0.70.0)
  * spree_auth (0.70.0)
  * spree_core (0.70.0)
  * spree_dash (0.70.0)
  * spree_editor (0.50.1 d79955e)
  * spree_i18n (1.0.0 7b0f3f2)
  * spree_promo (0.70.0)
  * spree_sample (0.70.0)
  * spree_static_content (0.60.2 5016859)
  * sprockets (2.0.3)
  * state_machine (1.0.1)
  * stringex (1.0.3)
  * thor (0.14.6)
  * tilt (1.3.3)
  * treetop (1.4.10)
  * turn (0.8.3)
  * tzinfo (0.3.31)
  * uglifier (1.0.4)
  * warden (1.0.6)

@radar
Copy link
Contributor

radar commented Nov 15, 2011

Ah, you're using 0.70.0. We'd recommend updating to 0.70.1 which comes with faster asset compilation and may contain a fix for this issue as I am unable to duplicate it on my machine.

@radar radar closed this as completed Nov 23, 2011
@jumski
Copy link

jumski commented Dec 24, 2011

i'm on 0.70.3 and i suffer from the same error when accessing order->customer details

@saten
Copy link

saten commented Jan 9, 2012

same issue on 0.70.4.beta

@raw1z
Copy link

raw1z commented Jan 12, 2012

same issue on 0.70.3

@radar
Copy link
Contributor

radar commented Jan 17, 2012

Please provide steps to reproduce this issue.

@fuksito
Copy link

fuksito commented Jan 23, 2012

I have the same thing on 0.70.3, just created an order and went to admin panel to look at it

@radar radar reopened this Jan 23, 2012
@radar radar closed this as completed in ba956af Jan 23, 2012
@radar
Copy link
Contributor

radar commented Jan 23, 2012

Hi @fuksito, please try pointing your app to 0-70-stable and giving that a shot. @ba956af2fb2e063a443bc0090177d3abded3a611 should have fixed this issue.

@fuksito
Copy link

fuksito commented Jan 23, 2012

I`ve just added

  config.assets.precompile += ['admin/address_states.js']

to my config and it solved the problem

@radar
Copy link
Contributor

radar commented Jan 23, 2012

Whoops, my mistake. Now @1f3b443 in 0-70-stable branch should fix that. You don't need to that line in your config any more if you're using the latest ref of this branch.

@fuksito
Copy link

fuksito commented Jan 23, 2012

Great, thank you

@eevee
Copy link

eevee commented Feb 13, 2012

Looks like 1.0 never got this fix? address_states.js isn't mentioned at all in https://github.com/spree/spree/blob/1-0-stable/core/lib/spree/core/engine.rb and "customer details" for an order won't load as a result.

@radar
Copy link
Contributor

radar commented Feb 13, 2012

If you add this to that precompile line, does it make it work? Would you be able to submit a patch to fix it? I am travelling for the next 20 hours and so I have very limited internet during that time.

@nezza
Copy link

nezza commented Feb 13, 2012

Yes, it does make it work.

diff --git a/core/lib/spree/core/engine.rb b/core/lib/spree/core/engine.rb
index 44740ab..97e2af9 100644
--- a/core/lib/spree/core/engine.rb
+++ b/core/lib/spree/core/engine.rb
@@ -71,7 +71,7 @@ module Spree

       # sets the manifests / assets to be precompiled
       initializer "spree.assets.precompile" do |app|
-        app.config.assets.precompile += ['store/all.*', 'admin/all.*', 'admin/orders/edit_form.js', 'jqPlot/excanvas.min.js', 'admin/images/new.js', 'jquery.j
+        app.config.assets.precompile += ['store/all.*', 'admin/all.*', 'admin/orders/edit_form.js', 'admin/orders/address_states.js', 'jqPlot/excanvas.min.js'
       end

       initializer "spree.asset.pipeline" do |app|

@radar
Copy link
Contributor

radar commented Feb 14, 2012

This should be fixed with @56dc7c8 now on master, and @71f7dff on 1-0-stable.

Thanks guys!

@jumski
Copy link

jumski commented Feb 23, 2012

Changing path in assets.precompile is not enough. This file still references the old path (admin/address_states.js). And that file is not in admin/orders, but still at admin/.

I have fixed it on my fork but created branch off 1-0-stable. Should i recreate it from master before pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants