$ ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
$ gem list
D:\worksoft\...\Ruby1.9.2\bin\ruby.exe: No such file or directory --
/cygdrive/d/worksoft/.../Ruby1.9.2/bin/gem (LoadError)
解决方法:
在cygwin中进入/home/King(username)或者通过window找到此目录,本人window目录:D:\cygwin\home\King
找到".bashrc",window下用notepad(或其它编辑器)打开,加入下列内容:
alias gem='gem.bat'
alias rake='rake.bat'
alias erb='erb.bat'
alias irb='irb.bat'
alias rdoc='rdoc.bat'
alias ri='ri.bat'
alias rspec='rspec.bat'
alias cucumber='cucumber.bat'
alias bundle='bundle.bat'
保存后,重新启动cygwin,再输入gem list试试。