Bundler错误是bundle install Nokogiri

时间:2022-08-07 00:16:44

When I $bundle install --without production, I get this:

当我花了$bundle install—没有生产时,我得到以下信息:

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.

My gemfile looks like this:

我的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

1 个解决方案

#1


2  

You probably have some missing dependencies for native extension. When you run gem install nokogiri -v '1.5.5' it should output what is missing and you can fix it.

对于本机扩展,您可能有一些缺失的依赖项。当您运行gem安装nokogiri -v '1.5.5'时,它应该输出丢失的内容,您可以修复它。

On Debian/Ubuntu you can also run following

在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

这是一个非常重要的问题,它是一个非常重要的问题,它是一个非常重要的问题。

to install dependencies commonly required by Ruby / gems. This might solve the problem for you.

安装Ruby / gems通常需要的依赖项。这可能会解决你的问题。

#1


2  

You probably have some missing dependencies for native extension. When you run gem install nokogiri -v '1.5.5' it should output what is missing and you can fix it.

对于本机扩展,您可能有一些缺失的依赖项。当您运行gem安装nokogiri -v '1.5.5'时,它应该输出丢失的内容,您可以修复它。

On Debian/Ubuntu you can also run following

在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

这是一个非常重要的问题,它是一个非常重要的问题,它是一个非常重要的问题。

to install dependencies commonly required by Ruby / gems. This might solve the problem for you.

安装Ruby / gems通常需要的依赖项。这可能会解决你的问题。