无法在 Cygwin 下运行 Rails,因为 LoadError: No such process from 摘要/md5
在尝试在 Cygwin 下运行 Rails 时,./script/server 命令产生加载错误,我无法找到在 Google 上搜索的解决方案。我可以在 irb 中重现此错误,如下所示:
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'digest/md5'
LoadError: No such process - /usr/lib/ruby/1.8/i386-cygwin/digest/md5.so
from /usr/lib/ruby/1.8/i386-cygwin/digest/md5.so
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):2
$ ruby --version ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
rails (2.3.8, 2.1.0) 都失败并出现相同的错误
$ uname -a CYGWIN_NT-5.1 XXXXXX 1.5.25(0.156/4/2) 2007-12-14 19:21 i686 Cygwin
In trying to run Rails under Cygwin, the ./script/server command is producing a load error that I can't find a solution for searching on Google. I can reproduce this error in irb as follows:
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'digest/md5'
LoadError: No such process - /usr/lib/ruby/1.8/i386-cygwin/digest/md5.so
from /usr/lib/ruby/1.8/i386-cygwin/digest/md5.so
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):2
$ ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
rails (2.3.8, 2.1.0) both fail with the same error
$ uname -a
CYGWIN_NT-5.1 XXXXXX 1.5.25(0.156/4/2) 2007-12-14 19:21 i686 Cygwin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的问题是 rubyoci8 是针对一个 Oracle 客户端构建的,但使用的是另一个客户端。
我的计算机上有多个 Oracle 客户端,包括多个完整客户端和一个即时客户端。所有这些都在我的 Windows $PATH 上,还有各种其他垃圾。
rubyoci8 make 程序搜索 $PATH 以检测是否安装了完整的客户端,但随后在另一点使用 $ORACLE_HOME 变量 - 我怀疑这种双重搜索可能与该问题有关。
对我来说,解决方案是清除 $PATH(在我的 .bash* 脚本之一中),仅保留最基本的内容,然后仅包含我需要的完整客户端路径。我将 $ORACLE_HOME 设置为同一位置,重建 rubyoci8,它起作用了。
My problem turned out to be that rubyoci8 was getting built against one Oracle client and but using another one.
I have multiple Oracle clients on my machine including a number of full clients and an instant client. All of these were on my Windows $PATH, along with all kinds of other junk.
The rubyoci8 make program searches the $PATH to detect whether a full client is installed, but then uses the $ORACLE_HOME variable at another point - I suspect this double searching might have something to do with the problem.
The solution for me was to clear the $PATH down (in one of my .bash* scripts) to just the bare essentials, and then include only the full client path I needed. I set $ORACLE_HOME to the same location, rebuilt rubyoci8, and it worked.