简体   繁体   中英

Sass::SyntaxError: File to import not found or unreadable In Rails 3

My gem file is following-

source 'https://rubygems.org'

# Act as follower is added for one user to follow another user(basically making friends)
# Downloaded https://github.com/tcocca/acts_as_follower
gem 'acts_as_follower', :path => 'vendor/gems/acts_as_follower-master'

gem 'rails', '3.2.13'
gem 'mysql2', '0.3.14'
# Provide a user facility to authenticate from facebook.
gem 'omniauth-facebook', '1.4.0'

# Gems used only for assets and not required
# in production environments by default.
gem 'bourbon', '~> 3.1.8'
gem 'bootstrap-sass', '~> 3.2.0'

group :assets do
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

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

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

# Deploy with Capistrano
gem 'capistrano'
gem 'rvm-capistrano'

# To use debugger
gem "factory_girl_rails", "~> 4.0"
gem 'execjs'
gem 'therubyracer', :platforms => :ruby
group :test, :development do
  # gem "rspec-rails", "~> 2.0"
  gem 'debugger'
  #gem 'rcov'
  #gem 'rails-dev-tweaks', '~> 0.6.1'
end
gem "kaminari"
gem 'rest-client'
gem 'annotate', ">=2.5.0"
gem 'resque', :require => "resque/server"
gem "resque-scheduler"
gem "tire", '0.6.0'
gem 'spree', '2.0.3'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-0-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-0-stable'
gem "rspec-rails", "~> 2.0"

gem 'uuid4r' # sudo apt-get install -y libossp-uuid-dev
gem 'builder'
gem 'nokogiri'
gem 'aes'
gem 'customerio'
gem 'braintree'
gem 'fog', '1.14.0'
gem 'asset_sync'
gem 'curb'
gem 'andand', '1.3.3'
gem 'friendly_id', '4.0.10.1'
gem 'avalara', '0.0.3'
gem 'clockwork', '0.7.5'
gem 'daemons', '1.1.9'
gem 'delayed_job_active_record', '4.0.1'
gem 'fb_graph', '2.7.15'
gem 'analytics-ruby', '~> 2.0.0', :require => 'segment/analytics'
gem "dynamic_sitemaps"
gem 'spreadsheet', '0.9.8'
gem 'acts-as-taggable-on'
gem 'acts_as_votable', '~> 0.10.0'
#gem 'bourbon'

And my application.scss file is following-

/* Settings */
@charset "UTF-8";

/* Vendor */
@import 'bourbon';
@import 'chosen';
@import 'jquery-ui';
@import 'slick';

/* Helpers */
@import 'helpers/variables';
@import 'helpers/mixins';

/* Base */
@import 'base/base';
@import 'base/typography';
@import 'base/fonts';
@import 'base/icons';

/* Layout */
@import 'layout/grid';
@import 'layout/forms';
@import 'layout/header';
@import 'layout/header_overlay';

/* Components */
@import 'components/tab_nav';
@import 'components/ratings';
@import 'components/modal';
@import 'components/book_3d';
@import 'components/friend_search';
@import 'components/friend_cloud';
@import 'components/friend_list';
@import 'components/why_librify';
@import 'components/tags';
@import 'components/bookclub_comments';
@import 'components/datepicker';
@import 'components/tooltip';

/* Pages */
@import 'pages/book';
@import 'pages/bookclub';
@import 'pages/checkout';

And I am trying to run following command -

RAILS_ENV=development bundle exec rake assets:precompile:all --trace

and it gives us following error -

Sass::SyntaxError: File to import not found or unreadable: bourbon.
Load paths:

Ravendra, try specifying the gem version number in your gemfile. description here

gem "bourbon", "~> 0.2.1"

rake bourbon:install will not help you on rails 3.1+

According to documentation you should import it like this:

@import "bourbon/bourbon";

Try to use that instead of "@import 'bourbon';"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM