简体   繁体   English

即使Nokogiri已在Gemfile中列出,也不会安装为gem

[英]Nokogiri not installing as a gem even though it's listed in Gemfile

Nokogiri isn't installing even though it's listed in the Gemfile. 即使Nokogiri已在Gemfile中列出,也不会安装。 Help? 救命?

[root@mongo p]# cat Gemfile
source 'http://rubygems.org'

gem 'rails', '3.2.12'
gem 'mysql2'
gem 'jquery-rails'


# ============================
# Gems
# ============================
gem 'whois'
gem 'nokogiri'
gem 'bson_ext'
gem 'bson'
gem 'newrelic_rpm'
gem 'rpm_contrib'
gem 'savon'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end


# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end



[root@mongo p]# bundle install
Using rake (10.1.0)
Using i18n (0.6.4)
Using multi_json (1.7.7)
Using activesupport (3.2.12)
Using builder (3.0.4)
Using activemodel (3.2.12)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.2.2)
Using actionpack (3.2.12)
Using mime-types (1.23)
Using polyglot (0.3.3)
Using treetop (1.4.14)
Using mail (2.4.4)
Using actionmailer (3.2.12)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.12)
Using activeresource (3.2.12)
Using gyoku (1.0.0)
Using akami (1.2.0)
Using bson (1.9.0)
Using bson_ext (1.9.0)
Using coffee-script-source (1.6.2)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Using json (1.8.0)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.12)
Using coffee-rails (3.2.2)
Using httpi (2.0.2)
Using jquery-rails (3.0.1)
Using mysql2 (0.3.11)
Using newrelic_rpm (3.6.4.122)
Using nori (2.1.0)
Using bundler (1.3.1)
Using rails (3.2.12)
Using rpm_contrib (2.1.11)
Using sass (3.2.9)
Using sass-rails (3.2.6)
Using wasabi (3.1.0)
Using savon (2.2.0)
Using uglifier (2.1.1)
Using whois (3.1.3)
Your bundle is complete! It was installed into ./vendor/bundle

Please at first remove Gemfile.lock file to make sure that bundle rebuild all dependencies, and install all gem as for a first time, and recreate the file, then: 请首先删除Gemfile.lock文件,以确保该捆绑包重建了所有依赖关系,并首次安装所有gem,然后重新创建该文件,然后:

$ bundle install

Please verify, that the nokogiri gem has presented in the Gemfile.lock . 请核实,该引入nokogiri宝石在Gemfile.lock的已提出。 Then to make sure that the nokogiri gem is properly installed type: 然后,确保正确安装了nokogiri gem,请输入:

$ bundle show nokogiri
/path/to/nokogiri/gem

I above command shows an error others to Could not find gem 'nokogiri' that means that the setup of your systems is incorrect. 我上面的命令显示了一个错误,其他人找不到gem'nokogiri' ,这意味着您的系统设置不正确。 So please don't use root account, and use simple user as holder of the project. 因此,请不要使用root帐户,而要使用简单用户作为项目的所有者。 And to separate project gem versions from each other use rvm to install gems into its gemsets as it has been written here . 为了将项目gem版本彼此rvm ,请使用rvm将gem安装到此处的 gemset中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 即使在Gemfile中列出了Heroku,它也无法识别“春天”的宝石 - Heroku doesn't recognize 'spring' gem, even though it's listed in the Gemfile 捆绑器即使安装在Gemfile中也不会安装Jasmine gem - Bundler not installing Jasmine gem even when it's in Gemfile 即使它位于Gemfile中并且捆绑安装位于Dockerfile中,也找不到gem mysql2 - Could not find gem mysql2 even though it's in the Gemfile and bundle install is in the Dockerfile 安装Nokogiri gem时出错 - Error installing Nokogiri gem 在Windows上安装Nokogiri gem - Installing Nokogiri gem on windows 为什么在 Gemfile 中包含 gem 可以解决 railtie 问题,即使 Gemfile.lock 中已包含相同的 gem? - Why does including a gem in Gemfile resolve a railtie issue, even though this same gem is already included in Gemfile.lock? 安装简单导航gem,gemfile中未列出 - Install simple-navigation gem, not listed in gemfile 安装nokogiri的gem devkit(windows)时缺少libxml2 - libxml2 missing when installing nokogiri's gem devkit (windows) 即使不在 Gemfile 中,“捆绑安装”也会继续安装 gem sqlite3 版本 1.4.2 - 'bundle install' keeps installing gem sqlite3 version 1.4.2 even if not in Gemfile 缺少Rails 2.3.4宝石。 即使它已安装! - Missing the Rails 2.3.4 gem. Even though it's installed!
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM