搭建ruby on rails出现Gem::DependencyError的解决方法
今天按照网上的教程打算在xp下搭建一个ruby on rails的开发环境结果出现了一个错误,网上搜了一遍问题解决了。下面总结一下解决方法备忘。
错误提示出现在自动安装gem的过程中。
——————————————我是分割线——————————————
D:/ruby187/gem install rails --include-dependencies
ERROR:? While executing gem ... (Gem::DependencyError)
??? Unable to resolve dependencies: rails requires activesupport (= 3.2.3)... ? --此处省略若干字错误信息
——————————————我是分割线——————————————
解决步骤:
1、gem update --system #先在线更新rubygem
2、依次执行下面命令:
?
[ruby]?view plaincopy?
如果不出意外,此时rubyonrals的开发环境已经搭建成功。
如果此时又会出现一个新的错误,请接着往下看。
——————————————我是分割线——————————————
ERROR:? Error installing rails:
??????? The 'json' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
——————————————我是分割线——————————————
这次提示要安装devkit(顺带吐槽一下:错误提示中提供了下载链接不能用,应该是被q1ang了)。下载下来的文件是一个压缩文件。双击解压到任意目录。依次执行下面命令
?
[ruby]?view plaincopy