我一直在StackOverflow中寻找答案,但是在三天的失败之后,我放弃了安装Ruby。
当前已安装:
- Ruby(股票)
- RVM
- Ruby安装程序从http://railsinstaller.org/
在配置过程中出现错误。我已经尝试过从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,但是安装它是一个痛苦的过程。
按以下步骤操作:
- 从http://rubyinstaller.org/downloads/下载Rails安装程序和DevKit。
- 安装Ruby。
- 创建目录并在
C:
上提取DevKit,即C:DevKit
。 - 将Devkit的路径复制到
Environment Variables > Path
即C:DevKitbin;
。 - 打开
cmd
并输入以下内容:
- 打开另一个
cmd
,输入gem install rails
。 - 安装MySQL:
gem install mysql
.
注意:确保将Ruby的路径复制到Environment Variables > Path
。这里有一个关于在rails上安装Ruby的选择
您使用Linux环境吗?如果是,请按照"here"中的说明操作。