Michael Liu
Michael Liu

Reputation: 1131

Running into gems error on Rails 4

I'm relatively new to Rails, and I'm trying to create a basic spree app using Rails 4.0. I recently tried to install an extension (spree_fancy) for my store, and while running the bundle exec rails g spree_fancy:install command, I keep seeing this message:

Unsupported rails environment for compass.

Before installing the extension, I could see my app load on local, but now I'm met with:

NoMethodError

and:

undefined method `empty?' for nil:NilClass

I'm assuming this error is caused by spree_fancy. Is there a way to fix this? If not, how would I go about removing the spree_fancy gem? I removed it from the Gemfile, ran gem uninstall spree_fancy, and reinstalled my bundle, but this did not seem to do the trick.

Any help would be greatly appreciated.

Upvotes: 0

Views: 655

Answers (2)

James Chevalier
James Chevalier

Reputation: 10874

Based on the Unsupported rails environment for compass. error, this sounds like an issue with compass and Rails 4.

Use a version of compass-rails that's compatible with Rails 4 by changing the gem 'compass-rails' line in your Gemfile to:

gem 'compass-rails', github: 'milgner/compass-rails', branch: 'rails4'

I'm not sure if spree_fancy, itself, is compatible with Rails 4, so you might want to check out Ready for Rails 4? to see if gems that you're using are compatible with Rails 4.

Upvotes: 1

gmacdougall
gmacdougall

Reputation: 4911

The current released version of Spree does not support rails 4. There is a branch of Spree which supports Rails 4 which you can read more about at this Spree Rails 4 Blog Post.

I don't believe that spree_fancy currently supports Rails 4, as it relies on Compass which does not support Rails 4. There are a couple of branches which support rails 4, but spree_fancy isn't configured to use them.

Short version: Spree on Rails 4 isn't ready for prime time quite yet. If you're new to rails, you should stick to 3.2.x for Spree. Spree on Rails 4 will be ready in a few months, and you can upgrade then.

Upvotes: 1

Related Questions