I wanted to setup Spree locally on my Macbook but the directions on their site didn’t work. At all. Here is how I got it installed and working.
Install RVM + Rails (poor mans rails installer)
\curl -L https://get.rvm.io | bash -s stable --rails
I found the documentation at https://github.com/spree/spree to be more specific. When I tried to install using the tutorial documentation it failed due to it installing Rails 4 which the Spree it installed was not compatible with. I had to come back and change the commands to install the correct version of rails.
Install Rails Version that Works With Spree
rvm gemset create rails32
Then copy the last part it outputs after /ruby- such as “[email protected]” to use in the next command
rvm [email protected]
This switches you to use that gemset you just created.
gem install rails -v 3.2.13
Now you should be able to check your rails version and it should return 3.2.13
rails -vInstall bundler gem install bundler
Install Imagemagick using Brew
brew install imagemagick
Install Spree Command Gem
gem install spree_cmd
Create Your Spree Project
rails new mystore
Finally, we can install Spree!
cd mystore spree install --auto-accept
That will give you a nice error and tell you to run “bundle install”. When you run that you’ll get an error about jquery-rails like so: Bundler could not find compatible versions for gem “jquery-rails”:
spree (= 2.0.3) ruby depends on jquery-rails (~> 2.2.1) ruby jquery-rails (3.0.2)
To fix that open the file named gemfile in the mystore directory and change this line:
gem 'jquery-rails', '2.2.1'
spree install -A
Now we can start the server and see our handiwork.
Then visit http://0.0.0.0:3000 in your browser and rock Spree! Whew - anyone else feel that was harder than it should have been?comments powered by Disqus