Sass :: SyntaxError:导入未找到或不可读的文件在Rails 3中

时间:2015-03-30 11:17:47

标签: ruby-on-rails ruby sass

我的宝石文件如下 -

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'

我的application.scss文件正在关注 -

/* 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';

我正在尝试运行以下命令 -

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

它给我们以下错误 -

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

2 个答案:

答案 0 :(得分:0)

Ravendra,尝试在gemfile中指定gem版本号。 description here

gem“bourbon”,“〜> 0.2.1”

rake bourbon:安装不会帮助你在rails 3.1 +

答案 1 :(得分:0)

根据documentation,你应该像这样导入它:

@import "bourbon/bourbon";

尝试使用它代替" @import' bourbon';"