plugins - Vagrant无法安装依赖nokogiri的插件

标签 plugins vagrant osx-mavericks

我正在尝试安装 vagrant (1.5.1) 的rackspace 插件:

vagrant plugin install vagrant-rackspace

但它提示

Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is:

An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue. Make sure that gem install nokogiri -v '1.6.1' succeeds before bundling.

但是 gem install nokogiri -v '1.6.1'/Applications/Vagrant/embedded/bin/gem install nokogiri -v '1.6.1' 都可以工作.

我看过一堆 SO 主题和博客文章。我尝试过但没有成功的事情

  1. 运行xcode-select --install
  2. 安装完整的 xcode
  3. brew 安装 gcc-4.2
  4. 删除 rvm 和 ruby​​ 的 rvm 版本
  5. 安装 nokogiri w/内置 (mac) ruby​​ 和 vagrant-embedded ruby​​

尽管事实上 nokogiri 在没有 sudo 的情况下安装得很好(上面#5),vagrant plugin install vagrant-rackspace 仍然失败...

所以,总而言之,我可以安装 nokogiri 插件,但是我无法安装 vagrantrackspace 插件,你能帮我安装该插件吗?

相关主题

完整输出 vagrant plugin install vagrant-rackspace --debug

最佳答案

我在 OSX Mavericks 上,这对我有用:

设置为环境属性:

NOKOGIRI_USE_SYSTEM_LIBRARIES=1 

然后照常安装:

vagrant plugin install vagrant-rackspace

关于plugins - Vagrant无法安装依赖nokogiri的插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22413689/

相关文章:

node.js - 如何使用 vagrant 设置 Node 检查器?

php - OSX 10.9 xdebug 错误 phpize

macos - Mac OSX Mavericks 升级清除/usr/local/bin

python - 小牛升级后 virtualenvwrapper 的终端问题

visual-studio-2008 - 为 Visual Studio 2008 推荐的 TDD/Agile/Source Control 插件

用于 Web 开发的 emacs 插件

javascript - 在 VM 共享目录上运行 `grunt`

rubygems - 如何控制 Vagrant 用于配置虚拟机的 Chef 版本?

html5 - 如何在qutebrowser中启用HTML5视频?

java - 在 Chrome 和 Firefox 中启用 Java 来测试自签名小程序