Omnipresent
Omnipresent

Reputation: 30424

uninitialized constant Compass in rails 3 app

I was trying to use fancy-buttons gem in my rails 3 app but now I can not even start my local server because of this error:

$:~/rails/project$ rails server /usr/lib/ruby/gems/1.8/gems/fancy-buttons-1.0.6/lib/fancy-buttons.rb:1: uninitialized constant Compass (NameError)

This is what my gemfile looks like:

gem "fancy-buttons"
gem 'haml' 
gem 'haml-rails' 
gem 'compass', ">= 0.10.6" 

I've ran bundle update and bundle install

Using haml (3.0.25) 
Using compass (0.10.6) 
Using fancy-buttons (1.0.6) 

How can I fix this?

Upvotes: 2

Views: 1704

Answers (1)

Gazler
Gazler

Reputation: 84180

Compass needs to come before fancy-buttons in your gemfile. This ensures that it is loaded before fancy-buttons tries to require it as the gems in your gemfile are loaded in order.

Upvotes: 7

Related Questions