2012-08-31 94 views
3

當我$bundle install --without production,我得到這個:捆紮機錯誤,當我嘗試做捆綁安裝引入nokogiri

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 

回答

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

安裝由紅寶石/寶石通常需要依賴。這可能會爲您解決問題。