• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

RubyGems的+ Cygwin的POSIX路径不被发现ruby.exe

用户头像
it1352
帮助1

问题说明

我在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不处理批处理文件?

正确答案

#1

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

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

当你打电话你调用./gem的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/

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcfgijg
系列文章
更多 icon
同类精品
更多 icon
继续加载