在Cygwin使用Ruby问题

Tech

E-texteditor需要cygwin来使用Bundles的功能,在默认的安装的情况下在cygwin中调用ruby会出现
/usr/bin/ruby: no such file to load -- ubygems (LoadError)
的错误提示。

这是因为cygwin中虽然声明了RUBYOPT环境变量,但是rubygem却并没有安装。
declare -x RUBYOPT="-rubygems"

一种解决方法是使用
unset RUBYOPT
清楚此变量,可以将其写入cygwin的用户profile中。

另一种彻底的解决方法是到rubyforge上下载rubygem然后在cygwin下安装,一劳永逸。

安装方法,解压下载的压缩包,在cygwin下进入其目录,先使用unset RUBYOPT,然后ruby setup.rb 即可完成安装。

Rand Posts:

One Response to “在Cygwin使用Ruby问题”

  1. jesse Says:
    三月 20th, 2008 at 4:43 下午

    helped me, thanks.

Leave a Reply

Designed By Ben Swift. 由 yo2.cn 提供 WordPress 博客服务
Entries RSS Comments RSS 登录