我已经安装了Redmine,只要我使用开发服务器就可以正常工作。现在我正在尝试使用fastcgi将其配置为在apache下运行。显示以下消息:
/usr/local/share/gems/gems/fcgi-0.9.2.1/lib/fcgi.rb:54:in `for_fd': not a socket file descriptor (ArgumentError)
from /usr/local/share/gems/gems/fcgi-0.9.2.1/lib/fcgi.rb:54:in `default_connection'
from /usr/local/share/gems/gems/fcgi-0.9.2.1/lib/fcgi.rb:40:in `each'
from /usr/local/share/gems/gems/rack-1.4.7/lib/rack/handler/fastcgi.rb:27:in `run'
from ./dispatch.fcgi:20:in `<main>'
看起来这个问题与ruby中的套接字有关,为了方便起见,我已经解决了这个问题:
#!/usr/bin/env ruby
require 'socket'
s=Socket.for_fd(STDIN.fileno)
当我尝试运行上面的代码时,会显示相同的消息:
/tmp/test.rb:5:in `for_fd': not a socket file descriptor (ArgumentError)
由于我不是红宝石程序员,我想了解,发生了什么?