Rails 4 was released last week and the Spree team has already made significant efforts to support it. We’ve been doing some work on a Rails4 branch on the last couple of weeks. You might want to check out the branch logs to get an idea of possible breaking changes related to Rails 4.
At this point users should be able to run Spree on a Rails 4 application following the steps below.
Create a new Rails 4 project.
gem install rails --version 4.0.0 --no-ri --no-rdoc rails _4.0.0_ new ecommerce
Add the following lines to your Gemfile.
gem 'spree', github: 'spree/spree', branch: 'rails4' gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: 'rails4' gem 'ransack', github: 'ernie/ransack', branch: 'rails-4' gem 'awesome_nested_set', github: 'huoxito/awesome_nested_set', branch: 'rails4'
rails g spree:install --sample=false --seed=false
At this point, update the Spree initializer to point to the right User class.
Spree.user_class = "Spree::User" # at config/initializers/spree.rb
Seed and load sample data.
rake db:seed rake spree_sample:load
We’re looking foward to your feedback! And please let us know if you run into any issues. Hopefully we should have new releases for every Spree dependency some time after the official Rails 4 release. An official Spree version with Rails 4 support will come soon after that :-)