Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 运行“bundle install”时,bundler尝试安装已在本地安装的gem_Ruby On Rails_Rubygems_Bundler - Fatal编程技术网

Ruby on rails 运行“bundle install”时,bundler尝试安装已在本地安装的gem

Ruby on rails 运行“bundle install”时,bundler尝试安装已在本地安装的gem,ruby-on-rails,rubygems,bundler,Ruby On Rails,Rubygems,Bundler,bundler在尝试安装“nokogiri”gem时遇到了一些问题,因此我们继续使用“gem install nokogiri”手动安装了它——它位于RVM ruby中,并使用本机扩展安装 现在,当运行“bundle安装”时,bundle似乎仍在尝试安装nokogiri!我看到它说,当bundle运行时,它首先在本地检查gems,为什么不会发生这种情况 更新: 我们正在使用Capistrano进行部署,当我重写“bundle:install”任务以只运行“gem list-local”时,我得到

bundler在尝试安装“nokogiri”gem时遇到了一些问题,因此我们继续使用“gem install nokogiri”手动安装了它——它位于RVM ruby中,并使用本机扩展安装

现在,当运行“bundle安装”时,bundle似乎仍在尝试安装nokogiri!我看到它说,当bundle运行时,它首先在本地检查gems,为什么不会发生这种情况

更新:

我们正在使用Capistrano进行部署,当我重写“bundle:install”任务以只运行“gem list-local”时,我得到以下输出:

  * executing "gem list --local"
    servers: ["myServer"]
    [myServer] executing command
 ** [out :: myServer] actionmailer (3.2.3, 3.0.11, 2.3.5)
 ** [out :: myServer] actionpack (3.2.3, 3.0.11, 2.3.5)
 ** [out :: myServer] activemodel (3.2.3, 3.0.11)
 ** [out :: myServer] activerecord (3.2.3, 3.0.11, 2.3.5)
 ** [out :: myServer] activeresource (3.2.3, 3.0.11, 2.3.5)
 ** [out :: myServer] activesupport (3.2.3, 3.0.11, 2.3.5)
 ** [out :: myServer] bundler (1.0.22, 1.0.21 ruby)
 ** [out :: myServer] capistrano (2.12.0)
 ...
 ** [out :: myServer] nokogiri (1.4.3.1)
 ...
    command finished in 863ms
因为在我们的GEM文件中,require看起来像:

gem "nokogiri", "= 1.4.3.1"
在我看来,安装了正确的gem版本。但回到标准的“bundle:install”任务时,输出包括:

  * executing "cd /path/to/releases/20120619165617 && bundle install --gemfile /path/to/releases/20120619165617/Gemfile --path /path/to/shared/bundle"
    servers: ["myServer"]
    [myServer] executing command
 ** [out :: myServer] Fetching source index for http://rubygems.org/
 ** [out :: myServer] Using rake (0.9.2.2)
 ** [out :: myServer]
 ** [out :: myServer] Using activesupport (2.3.5)
 ** [out :: myServer]
 ** [out :: myServer] Using rack (1.0.1)
 ** [out :: myServer]
 ** [out :: myServer] Using actionpack (2.3.5)
 ** [out :: myServer]
 ** [out :: myServer] Using actionmailer (2.3.5)
 ** [out :: myServer]
 ** [out :: myServer] Using activerecord (2.3.5)
 ** [out :: myServer]
 ** [out :: myServer] Using activeresource (2.3.5)
 ...
 ** [out :: myServer] Installing nokogiri (1.4.3.1)
 ** [out :: myServer] with native extensions
 ** [out :: myServer]
 ** [out :: myServer] ←[33mGem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
 ** [out :: myServer]

不,但这和系统宝石有什么不同?如果gems位于gems集中,而系统上没有安装它们,bundler会在本地找到它们吗?您确定您安装的版本适合bundler的需要吗?检查Gemfile。。。