Take the 2-minute tour ×

After running this command

compass install bootstrap

I get this message:

identical sass/styles.scss


identical javascripts/bootstrap-typeahead.js
NoMethodError on line ["32"] of /Users/xxx/.rvm/gems/ruby-1.9.3-p327@favy/gems/sass-rails-3.2.6/lib/sass/rails/helpers.rb: undefined method `[]' for nil:NilClass
Run with --trace to see the full backtrace


 31     def resolver
 32       options[:custom][:resolver]
 33     end

I tried a workaround -> https://gist.github.com/castus/4044953

def resolver
  if ::Rails::env == "production"

& still no luck :)

I have this stuff in my config/compass.rb

require 'bootstrap-sass'

And my Gemfile

source 'http://rubygems.org'

gem "paperclip"
gem 'bootstrap-sass', '~>'
gem 'compass-rails'
gem 'bootswatch-rails'

gem 'gmaps4rails'

gem 'rails', '3.2.13'
gem 'activerecord-postgresql-adapter'
gem 'devise'
gem 'sass-rails', '~> 3.2.3'
gem "haml"
gem "haml-rails"

# Bundle edge Rails instead:

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'

gem 'jquery-rails'

# To use ActiveModel has_secure_password

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You don't need "Compass" at all if you are using Rails and Bootstrap-sass. Compass is for sites not using Rails.

Here are steps to install and bootstrap-sass

  1. Add it to Gemfile and bundle install

  2. Rename application.css to application.css.scss

  3. Remove all comments in application.css.scss, make it blank

  4. Add @import bootstrap

You are done! Treat it as normal css file and use @import to do whatever you like. But no more require in comment!

share|improve this answer
Thank you :) I just want to confirm. Can I use all this stuff (compass-style.org/reference/compass) after installing Bootstrap-sass ? –  whitesiroi Apr 16 '13 at 3:56
@whitesiroi, what you mentioned is Compass's CSS framework. You've already have a CSS framework in hand - Twitter bootstrap. Using two together is unnecessary and will have conflict. –  Billy Chan Apr 16 '13 at 4:07
Thank you very much :) –  whitesiroi Apr 16 '13 at 5:00
add comment

Your Answer


