我正在尝试安装bootstrap-sass-rails。我复制了这一行:gem 'bootstrap-sass-rails'
进入assets
组。我跑了bundle install
。我完全按照自述文件上的说明进行操作,但 Sass 抱怨它找不到“twitter/bootstrap”——我在定位文件时摆弄了一下,然后......
令人困惑的部分来了——gem 安装得很好(或者说 Bundler 是这么说的)。但是现在我的/vendor/assets/stylesheets
目录中什么都没有!我检查git status
并没有改变新的 Sass 文件(或其他任何东西),除了app/assets/stylesheets/application.css.scss
和app/assets/javascripts/application.js
!我以为那颗宝石可能坏了,但是bootstrap-sass也发生了同样的事情。
为什么我的 gem 没有正确安装?
完整的宝石文件:
source 'https://rubygems.org'
gem 'rails', '3.2.12'
gem 'bson_ext'
gem 'nokogiri'
gem 'execjs'
gem 'therubyracer'
gem 'rb-readline', '~> 0.4.2'
gem 'jquery-rails'
gem 'simple_form'
gem 'mysql2'
gem 'chronic'
gem 'prawn-labels'
gem 'draper'
gem 'ruby-aaws'
gem 'bcrypt-ruby'
gem 'sass-rails', '~> 3.2'
group :assets do
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'bootstrap-sass-rails'
end
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'quiet_assets'
gem 'thin'
end
group :development, :test do
gem 'bourne'
gem 'rspec-rails'
gem 'pry'
gem 'pry-doc'
gem 'pry-debugger'
gem 'pry-rails'
gem 'faker'
gem 'pdf-inspector'
gem 'guard-rspec'
gem 'guard-zeus'
gem 'guard-livereload'
gem 'debugger'
gem 'rb-fsevent' if RUBY_PLATFORM =~ /darwin/i
if RUBY_PLATFORM =~ /linux/i then
gem 'rb-inotify' # Filesystem changes
gem 'libnotify' # Desktop notifications
end
end
group :test do
gem 'factory_girl_rails'
end