Ruby rails 安装错误

来源:互联网 发布:查看oracle端口 编辑:程序博客网 时间:2024/06/03 16:59

在安装ruby的gem的时候可能会出现下面的提示, 按照给出的提示有两种办法可以解决,但是经过在网上的搜索发现只有最后一种可行。所以特分享于此。

ERROR:  Errorinstalling rails:

        The 'atomic'native gem requires installed build tools.

Please update your PATH to include build tools ordownload theDevKit

from 'http://rubyinstaller.org/downloads' and follow theinstructions

at'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

出错的原因是安装rails的时候,需要build tools,但系统中没有。出错信息中同时也给出了解决的法案:

1. 到http://rubyinstaller.org/downloads/ 去下载dev kit DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe

2. 按照http://github.com/oneclick/rubyinstaller/wiki/Development-Kit/ 安装dev kit

主要安装步骤如下:

     1.如果原来系统中已经安装了旧版的dev kit, 则删除它

     2.下载上面提到的dev kit

     3.解压下载下来的文件到指定的目录,如c:/devkit。(注意:目录不能有空格)

     4,在安装目录下运行ruby dk.rb,然后按照提示分别运行ruby dk.rbinitrubydk.rb install来增强ruby

     5,可以运行 gem install rdiscount–platform=ruby 来测试是否成功

按照安装步骤,完成了DevKit的安装,非常简单。

然后,再次安装需要的gem即可。


c:\DevKit>gem install rdiscount-platform=ruby
ERROR:  Could not find a valid gem 'rdiscount-platform=ruby' (>= 0) in any repository

解决方法:

1
gem install rdiscount –platform=ruby 
------------------------------------------
这样安装, 这是官方指定的, 
gem install rdiscount -s http://gemcutter.org

2

gem install rdiscount --platform=ruby


0 0
原创粉丝点击