RubyGems的+ Cygwin的:POSIX路径不被发现ruby.exe [英] RubyGems + Cygwin: POSIX path not found by ruby.exe

查看:156
本文介绍了RubyGems的+ Cygwin的:POSIX路径不被发现ruby.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上一个Ruby程序员谁改掉从赢cmd以Cygwin的切换,但不能达到执行Ruby宝石的批处理文件。

I am a Ruby programmer on Windows who trys to switch from Win cmd to Cygwin, but cannot achieve to execute batch files of Ruby gems.

我已经塞满的bin目录到Windows PATH ENV。变量,包括红宝石bin,其中可执行文件存储。宝石,然而,由ruby.exe本身,这导致了以下问题的POSIX路径调用

I already stuffed any bin directory into the Windows PATH env. variable, including the Ruby bin where the executables are stored. Gems, however, are invoked by ruby.exe itself, which leads to the following problem with POSIX paths:

duddle@duddledan /cygdrive/c/Ruby/ruby-186-398/bin
$ gem -v
C:\Ruby\ruby-186-398\bin\ruby.exe: No such file or directory -- /cygdrive/c/Ruby/ruby-186-398/bin/gem (LoadError)

duddle@duddledan /cygdrive/c/Ruby/ruby-186-398/bin
$ ./gem --version
1.3.7

当调用如 ./宝石直接通过指定路径,可以发现和执行。

When calling e.g. ./gem directly by specifying the path, it can be found and executed.

任何想法?

编辑:

如何判断的cygwin不处理批处理文件?

推荐答案

您正试图混合其期待与Cygwin的,原生的路径从而完全不喜欢的批处理文件。

You're trying to mix batch files which expect native paths with Cygwin, which completely dislike it.

当你打电话你调用./ge​​m的Ruby脚本,但使用 PATH 正在调用批处理文件。

When you call ./gem you're invoking the ruby script, but using the PATH is invoking the batch file.

要么你告诉Cygwin的不处理批处理文件(说不上怎么样),或者你使用MSYS击,如果你想更换的cmd.exe,但不与本地Ruby混合Cygwin的。

Either you tell cygwin not to process batch files (dunno how) or you use MSYS Bash if you want a replacement of cmd.exe, but don't mix Cygwin with native Ruby.

我的博客上讲述的混合和匹配的过去:

I've blogged about mixing and matching in the past:

http://blog.mmediasys.com/2008/10/27/handy-tip-dont-mix-one-click-installer-with-cygwin/

这篇关于RubyGems的+ Cygwin的:POSIX路径不被发现ruby.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆