我在装有 Vagrant v 1.4.1 的 Windows 7 机器上工作,我一直在努力安装 vagrant-berkshelf 插件。我正在遵循Mischa Taylor的博客中的一些说明。我已经安装了 VirtualBox (4.2.20),一个“健全”的 Ruby 环境(带有 DevKit)和 berkshelf gem,并且运行良好,但是每当我发出
> vagrant plugin install vagrant-berkshelf
该命令在尝试构建时返回错误
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/ext/builder.rb:62:in `run':
ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
C:/HashiCorp/Vagrant/embedded/bin/ruby.exe extconf.rb
C:/HashiCorp/Vagrant/embedded/bin/ruby.exe: invalid option -J (-h will show valid
options) (RuntimeError)
Gem files will remain installed in C:/Users/user_me/.vagrant.d/gems/gems/hitimes-
1.2.1 for inspection.
Results logged to C:/Users/user_me/.vagrant.d/gems/gems/hitimes-1.2.1/ext/hitimes/c/gem_make.out
from
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:39:in `block in build'
如果我发出
> gem install hitimes
效果很好,所以问题似乎出在 Vagrant 使用的扩展构建器中。我没有很多使用 Ruby 的经验,我只是想开始学习使用 chef 和 berkshelf 和 vagrant。