0

我一直在通过 StackOverflow 寻找答案,但在失败三天后我放弃了安装 Ruby。

目前我已经安装:

  1. 红宝石(股票)
  2. 虚拟机
  3. 来自http://railsinstaller.org/的 Ruby 安装程序

我在配置过程中遇到错误。我已经尝试从 SMF 切换到 Homebrew,但这并不好。

这是我得到的错误:

Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --prefix=/Users/Unwired/.rvm/rubies/ruby-1.9.3-p392 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libxml2:/usr/local/opt/libxslt:/usr/local/opt/libksba:/usr/local/opt/openssl:/usr/local/opt/sqlite --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /Users/Unwired/.rvm/log/ruby-1.9.3-p392/1366883126_configure.log
There has been an error while running configure. Halting the installation.

我很高兴开始学习 RoR,但安装它很痛苦。

4

2 回答 2

0

按着这些次序:

  1. 从http://rubyinstaller.org/downloads/下载 Rails 安装程序以及 DevKit。
  2. 安装红宝石。
  3. 创建一个目录并在 上解压 DevKit C:,即C:\DevKit.
  4. 将 Devkit 的路径复制到你的Environment Variables > Pathie, C:\DevKit\bin;.
  5. 打开cmd并输入以下内容:
红宝石dk.rb
ruby dk.rb 初始化
ruby dk.rb 安装
  1. 打开另一个cmd并键入gem install rails.
  2. 通过键入以下命令安装 MySQL:gem install mysql

注意:确保将 Ruby 的路径复制到Environment Variables > Path. 那里有一个关于在 Rails 上安装 Ruby 的选择。

于 2013-04-25T10:04:50.983 回答
0

你用的是Linux环境吗?如果是这样,请按照“此处”中的说明进行操作。

于 2013-04-25T10:09:22.520 回答