所以我使用 Bitnami 来学习 Ruby on Rails。我之前也尝试过手动安装 ruby 和 rails 并且遇到了同样的问题,所以我想我应该先尝试 Bitnami 的简单打包交易。无论如何,我对 json 的问题是它导致捆绑安装失败。
首先,由于 ssl 错误,rails new 的自动捆绑安装失败。这很容易通过将gemfile中的源https更改为http来解决。但是,当我尝试捆绑安装时,它会在尝试安装 json 时出现另一个错误。
C:\RubyStack-3.2.7-0\projects\testing>bundle install
Fetching gem metadata from http://rubygems.org/.........
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Installing activesupport (3.2.8)
Using builder (3.0.0)
Installing activemodel (3.2.8)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Installing actionpack (3.2.8)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Installing actionmailer (3.2.8)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Installing activerecord (3.2.8)
Installing activeresource (3.2.8)
Using bundler (1.1.5)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Installing json (1.7.5) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
C:/RUBYST~1.7-0/ruby/bin/ruby.exe extconf.rb
creating Makefile
make
0 [main] echo 5244 open_stackdumpfile: Dumping stack trace to echo.exe.sta
ckdump
make: *** [generator-i386-mingw32.def] Error 5
Gem files will remain installed in C:/RUBYST~1.7-0/ruby/lib/ruby/gems/1.9.1/gems
/json-1.7.5 for inspection.
Results logged to C:/RUBYST~1.7-0/ruby/lib/ruby/gems/1.9.1/gems/json-1.7.5/ext/j
son/ext/generator/gem_make.out
An error occured while installing json (1.7.5), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.5'` succeeds before bundling.
这是它在尝试安装 json 后生成的 gem_make.out 文件(顺便说一句,windows 也会产生一个错误,即 echo.exe 在运行 gem install json 时停止工作)
C:/RUBYST~1.7-0/ruby/bin/ruby.exe extconf.rb
creating Makefile
make
0 [main] echo 5244 open_stackdumpfile: Dumping stack trace to echo.exe.stackdump
make: *** [generator-i386-mingw32.def] Error 5
我什至无法开始学习 ror 设置已经是一个巨大的痛苦。(顺便说一句,我之前没有使用 Web 框架的经验,只是桌面编程)。帮助?