捆绑安装时出现Heroku Ruby错误

时间:2015-01-26 09:05:35

标签: ruby-on-rails heroku

我将逐步完成“入门指南”。我现在处于Declare App Dependencies。 (我在Windows 8.1上本地运行)

当我运行“bundle install”时,我有以下输出:

Fetching gem metadata from https://rubygems.org/............
Resolving dependencies...
Using rake 10.4.0
Using i18n 0.6.11

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    "C:/Program Files (x86)/Heroku/ruby-1.9.3/bin/ruby.exe" extconf.rb
creating Makefile

make
generating generator-i386-mingw32.def
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `C:/Program Files (x86)/Heroku/ruby-1.9.3/bin/ruby -e "puts 'EXPORTS', 'Init_generator'"  > generator-i386-mingw32.def'
make: *** [generator-i386-mingw32.def] Error 2


Gem files will remain installed in C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.1 for inspection.
Results logged to C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

在我看来错误就在“C:/ Program Files(x86)/ Heroku ...”行中。这里唯一的括号是(x86) - 自XP以来Windows的标准32位程序文件文件夹。

我在某处看过Ruby&宝石不适合名称中包含空格的文件夹。似乎我必须将Heroku移动到与“Program Files(x86)”不同的文件夹

是吗?我需要移动我的Heroku安装吗? 如果是这样,我该怎么做?

1 个答案:

答案 0 :(得分:0)

对于所有追求的人,答案是: 不要试图在WINDOWS BOX上运行HEROKU。让自己成为一个Linux虚拟机并开始使用它。