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.
当你打电话你调用./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
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
检查邮件是否发送成功
it1352 07-25 -
Android微调工具-删除当前选择
it1352 06-20 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20 -
希伯来语的空格句子标记化错误
it1352 06-22