当我$bundle install --without production
时,我明白了:
An error occured while installing nokogiri (1.5.5), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.5.5'` succeeds before bundling.
我的gemfile看起来像这样:
source 'https://rubygems.org'
gem 'rails', '3.2.8'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.11.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.2'
group :test do
gem 'capybara', '1.1.2'
end
group :production do
gem 'pg', '0.12.2'
end
答案 0 :(得分:2)
您可能缺少原生扩展的依赖项。
当你运行gem install nokogiri -v '1.5.5'
时,它应该输出缺少的东西,你可以修复它。
在Debian / Ubuntu上,您还可以运行以下
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
安装Ruby / gems通常需要的依赖项。这可能会为您解决问题。