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

Can't get Spree_Fancy to work with Fresh Spree 2.4 or 2.3 store #131

Open nungster opened 9 years ago

nungster commented 9 years ago

I've installed a fresh Spree 2.4 and 2.3 stable builds in two separate sites. With the 2-4-stable Spree, I've installed Spree_fancy as the read me states. The issue comes up that the spree_fancy gemspec looks for spree_core 2.3.0.beta which is no longer there

Bundler could not find compatible versions for gem "spree_core": In Gemfile: spree_fancy (>= 0) ruby depends on spree_core (~> 2.3.0.beta) ruby

spree_gateway (>= 0) ruby depends on
  spree_core (2.4.1)

Now I've also tried on the Spree 2-3-stable build and using the Spree_fancy 2-3-stable and that renders a different error ActionView::Template::Error (couldn't find file 'jquery.ui.all'

So, My question to anyone willing to help solve is this. What versions of Spree and Spree Fancy will currently work together out of the box?

My two failed combinations are:

gem 'spree', git: 'https://github.com/spree/spree.git', branch: '2-3-stable' gem 'spree_gateway', github: 'spree/spree_gateway', branch: '2-3-stable' gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-3-stable' gem 'spree_fancy', :github => 'spree/spree_fancy', :branch => '2-3-stable

and

Tried this 2.4 stable as well

gem 'spree', '2.4.1'

gem 'spree_gateway', github: 'spree/spree_gateway', branch: '2-4-stable'

gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-4-stable'

This is the attempt to run everything on bleeding edge

gem 'spree', github: 'spree/spree', :branch => 'master' gem 'spree_gateway', github: 'spree/spree_gateway', branch: 'master' gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: 'master' gem 'spree_fancy', :github => 'spree/spree_fancy'

dalawwa commented 9 years ago

I just can confirm I got spree_fancy working on 2-3 stable. Sorry I can't help more.

nungster commented 9 years ago

would you mind pasting in the steps that you used? Are you using RVM ? I am trying to do this on my Mac (Yosemite) and am now trying on Ubuntu 14.04

So did you use all 2-3-stables ?

dalawwa commented 9 years ago

Yes I used all 2-3 stables on ubuntu 14.04. I m using rbenv.

This is my Gemfile, try this, in this order, at the end of your Gemfile

gem 'spree', '2.3.3' gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-3-stable' gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-3-stable' gem 'spree_fancy', :github => 'spree/spree_fancy', :branch => '2-3-stable'

EDIT: This "ActionView::Template::Error (couldn't find file 'jquery.ui.all'" means jQuery wasn't properly loaded in your assets pipeline. So maybe have a look in your gemfile and check if you have this line gem 'jquery-rails'

nungster commented 9 years ago

thanks for the help, here's an update: On my Mac, I realized I did not have ImageMargick installed, so went there.

I got 2-3 spree going (easy) and then tried the spree_fancy 2-3-stable and it blew up again. This time I get this error after trying different things

ArgumentError in Spree::Home#index

Showing /Users/yoshi/.rvm/gems/ruby-2.1.1@chicvana/gems/spree_frontend-2.3.3/app/views/spree/shared/_head.html.erb where line #8 raised:

wrong number of arguments (3 for 2) (in /Users/yoshi/.rvm/gems/ruby-2.1.1@chicvana/gems/spree_frontend-2.3.3/app/assets/stylesheets/spree/frontend/screen.css.scss)

Extracted source (around line #8):

<%== meta_data_tags %> <%= canonical_tag(current_store.url) %> <%= favicon_link_tag 'favicon.ico' %>

LINE 8 <%= stylesheet_link_tag 'spree/frontend/all', :media => 'screen' %>

<%= stylesheet_link_tag 'spree/fancy/print', :media => 'print' %><%= csrf_meta_tags %> <%= javascript_include_tag 'spree/frontend/all' %>

I removed that line from the file to see what would happen, and the site comes up with the sliders working and of course the styling is messed up, but why am i getting wrong number of arguments (3 for 2), and of course how to remedy?

Thanks for your help, this is frustrating seeing that I am one gem away from getting started on customizing.

dalawwa commented 9 years ago

Thanks for your reporting. I am wondering whether you have that line in your app/controllers/application_controller.rb : protect_from_forgery with: :exception

nungster commented 9 years ago

That is there.

Update: It works now! I deleted my /vendor/assets folder - did not help, then I restored it.
After restore I got an error telling me to add this to my /config/initializer/assets.rb file Rails.application.config.assets.precompile += %w( bx_loader.gif ) I restarted the server and boom, it all works.

So I had some kind of asset compilation issue. I thought in Dev mode, it always compiles assets. Hopefully we can deduce why this behavior was happening for me and not anyone else.

dalawwa commented 9 years ago

Excellent! Enjoy the customization! Cheers

EduardoMarchese commented 9 years ago

Same as nungster on 2.4-stable, I added Rails.application.config.assets.precompile += %w( bx_loader.gif )in config/initializer/assets.rb and it worked perfectly

andremleblanc commented 9 years ago

I can confirm the same on 2.4-stable. Added Rails.application.config.assets.precompile += %w( bx_loader.gif ) to config/initializer/assets.rb which fixed the issue.