到目前为止,一切都很好,包括上传到 github 和 heroku,以及使用 postgres 进行 dev/test 和 prod/heroku。
我一添加
宝石'bootstrap-sass','2.0.0'
到我的 Gemfile 并运行bundle install
(或bundle install --without assets
)、spork、guard 和 rails(以及独立乘客)都抱怨以下内容:
/var/lib/rails/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:74:in `require': cannot load such file -- bootstrap/sass (LoadError)
from /var/lib/rails/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:74:in `rescue in block in require'
from /var/lib/rails/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:62:in `block in require'
from /var/lib/rails/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each'
from /var/lib/rails/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
from /var/lib/rails/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
from /var/lib/rails/sample_app/config/application.rb:13:in `<top (required)>'
from /var/lib/rails/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands.rb:53:in `require'
from /var/lib/rails/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands.rb:53:in `block in <top (required)>'
from /var/lib/rails/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
from /var/lib/rails/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
这是我的 Gemfile 和 Gemfile.lock 的相关部分:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'jquery-rails', '2.0.0'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'
#gem 'faker', '1.0.1'
#gem 'will_paginate', '3.0.3'
#gem 'bootstrap-will_paginate', '0.0.5'
group :development, :test do
#gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.9.0'
gem 'guard-rspec', '0.5.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.4'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
group :test do
gem 'capybara', '1.1.2'
#gem 'factory_girl_rails', '1.4.0'
#gem 'cucumber-rails', '1.2.1', require: false
#gem 'database_cleaner', '0.7.0'
gem 'guard-spork', '0.3.2'
gem 'spork', '0.9.0'
# gem 'rb-fsevent', '0.4.3.1', require: false
# gem 'growl', '1.0.3'
end
#group :production do
gem 'pg', '0.12.2'
#end
$ egrep "bootstrap|sass" Gemfile.lock
bootstrap-sass (2.0.0)
sass (3.1.17)
sass-rails (3.2.4)
sass (>= 3.1.10)
bootstrap-sass (= 2.0.0)
sass-rails (= 3.2.4)
该平台是一个 Gentoo OpenVZ 容器,使用专用的、非特权的“rails”帐户。
我已经检查了我的工作好几次,移除了宝石并重新捆绑,仍然没有爱。