Eclipse下安装Ruby问题的解决

来源:互联网 发布:简单的c语言程序代码 编辑:程序博客网 时间:2024/06/05 05:11

      今天试着安装Ruby,遇到一些问题,汇总在下面:

1、在Eclipse上安装Ruby 0.9.1插件,出现一个错误提示“Ruby mylyn connect failure”,错误描述“requires feature org.eclipse.mylyn.context_feature (2.0.0.v20070628-1000)”。

在网上查了一下资料,Mylyn是一个可选安装项,因此可以忽略。因为我是从Ruby网站上Download的RDT,在解压包下有一个site.xml文件,这个XML文件可能就是安装配置。所以打开site.xml文件,果然其中内容为:

<?xml version="1.0" encoding="UTF-8"?>
<site pack200="true" digestURL="http://updatesite.rubypeople.org/nightly/"> 
    
<description url="http://updatesite.rubypeople.org/nightly/">Ruby Development Tools</description>
    
<feature url="features/com.aptana.rdt.mylyn_feature_0.9.1.200711131528NGT.jar" id="com.aptana.rdt.mylyn_feature" version="0.9.1.200711131528NGT">
        
<category name="Ruby Integration"/>
    
</feature>
    
<feature url="features/org.rubypeople.rdt_0.9.1.200711131528NGT.jar" id="org.rubypeople.rdt" version="0.9.1.200711131528NGT">
        
<category name="Ruby"/>
    
</feature>
    
<category-def name="Ruby" label="Ruby Development Tools">
        
<description>Adds support for Rails development to Eclipse</description>
    
</category-def>
    
<category-def name="Ruby Integration" label="Ruby Integration Plugins">
        
<description>Ruby Development Tools integration for third party tools.</description>
    
</category-def>
</site>

   编辑site.xml文件,将与Mylyn相关的标签删除,重新安装Ruby插件即可。

2、安装Rails时,输入命令“gem install rails --include-dependencies”后,系统出现错误提示:ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)。

解决办法:(1).打开防火墙设置,因为Rails要从远程Download一些安装包到本地再进行安装(不明白为什么它要这样做,也许国外比国内网络好,从不出问题?);(2). 先安装Rake,在命令行中输入“gem install rake”,然后再次运行“gem install rails --include-dependencies”,问题解决。

原创粉丝点击