spree-contrib / spree_fancy

SpreeFancy is a responsive theme for Spree Commerce.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
86 stars 187 forks source link

Assest not found /assets/images/bx_loader.gif et al. #94

Closed amejiarosario closed 10 years ago

amejiarosario commented 10 years ago

I'm having errors about assets not being found in developement and many more in productions. Was this issue introduced by moving the assest to new path inside vendors? Any ideas how to solve it?

My setup

source 'https://rubygems.org'
ruby '2.1.1'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.3'

# Use postgresql as the database for Active Record
gem 'pg'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

gem 'passenger'
gem 'rails_12factor', group: :production
gem 'spree', github: 'spree/spree', branch: '2-2-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-2-stable'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '2-2-stable'
gem 'spree_fancy', github: 'spree/spree_fancy', branch: '2-2-stable'
radar commented 10 years ago

@amejiarosario Can you please show us these errors?

amejiarosario commented 10 years ago

The steps to reproduce the error is the following. I install spree

  1. Use the Gemfile described above without spree_fancy
  2. rails g spree:install --sample=false --seed=false
  3. bundle exec rake spree_auth:admin:create
  4. bundle exec rake db:migrate
  5. bundle exec rake spree_sample:load

Up to this point everything works fine. Installing spree_fancy gem:

  1. add spree_fancy to Gemfile
  2. bundle && bundle exec rake railties:install:migrations
  3. bundle exec rails g spree_fancy:install

After that, I see the following issues: 1) the slider is broken 2) some horizontal line in between the logo and 3) This error:

Started GET "/assets/images/bx_loader.gif" for 127.0.0.1 at 2014-02-25 15:47:20 -0400

ActionController::RoutingError (No route matches [GET] "/assets/images/bx_loader.gif"):
  actionpack (4.0.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (4.0.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.0.3) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.0.3) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.0.3) lib/active_support/tagged_logging.rb:67:in `block in tagged'
  activesupport (4.0.3) lib/active_support/tagged_logging.rb:25:in `tagged'
  activesupport (4.0.3) lib/active_support/tagged_logging.rb:67:in `tagged'
  railties (4.0.3) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.0.3) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.0.3) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.0.3) lib/action_dispatch/middleware/static.rb:64:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  railties (4.0.3) lib/rails/engine.rb:511:in `call'
  railties (4.0.3) lib/rails/application.rb:97:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
  /Users/adriansky/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
  /Users/adriansky/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
  /Users/adriansky/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

  Rendered /Users/adriansky/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.6ms)
  Rendered /Users/adriansky/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.1ms)
  Rendered /Users/adriansky/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/routes/_route.html.erb (115.7ms)
  Rendered /Users/adriansky/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/routes/_table.html.erb (7.6ms)
  Rendered /Users/adriansky/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (465.3ms)
donnykurnia commented 10 years ago

+1

I also have try to copy bx_loader.gif to app/assets/images, but it still not loaded by sprocket.

radar commented 10 years ago

This file doesn't exist within spree_fancy and so I think it's just a matter of changing that small fact.

radar commented 10 years ago

Hi @donnykurnia and @amejiarosario, can you please try out the 2-1-stable, 2-2-stable or master branches? I believe I have a fix on those branches for this issue.

donnykurnia commented 10 years ago

Hi @radar,

I have 2 spree site. The first is using 2-1-stable and have no problems loading image from app/assets/images. The 2-2-stable branch have this problem. I have try to put the image in app/assets/images, sprocket should be able to load it, but it didn't. I will try to update the gems today and see if it fix the problems or not.

PS: this is happened while in development. In production, bx_loader.gif precompiled normally.

donnykurnia commented 10 years ago

I see that it's fixed by commit 6 days ago in https://github.com/spree/spree_fancy/blob/2-2-stable/vendor/assets/stylesheets/jquery.bxslider.scss

radar commented 10 years ago

@donnykurnia I am confused. You said it's broken on the 2-2-stable branch and now you've said it's fixed.. but nothing has changed in the interim. Did you just not run bundle update spree_fancy to update to the latest from 2-2-stable? Is that why it was still broken for you in your second to last post?

donnykurnia commented 10 years ago

Hi @radar,

My comment is based on the 2-2-stable branch that I installed before your commit. I just realize that your comment is referring about the commit that you just do. So consider that my comment above is an acknowledge that it's have been fixed.

Thank you and sorry for the confusion.

radar commented 10 years ago

Ok, thanks for the clarification @donnykurnia :) If you find anything else, please let us know.