当我用 unicorn 启动 Rails 应用程序时出现奇怪的错误

发布于 12-11 08:54 字数 1170 浏览 0 评论 0原文

当我尝试使用 unicorn 启动 Rails 应用程序时,出现了这个非常奇怪的错误。有人见过这个吗?

[root@Web01 mp_app]# unicorn_rails -c config/unicorn.rb -E production -D -d
{:daemonize=>true,
 :app=>
  #<Proc:0x00002b14fff8c890@/usr/local/lib/ruby/gems/1.8/gems/unicorn-4.0.1/bin/unicorn_rails:135>,
 :unicorn_options=>{:config_file=>"config/unicorn.rb", :listeners=>[]}}
Exception `Errno::ENOENT' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - No such file or directory - tmp/cache
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - .
Exception `EOFError' at /usr/local/lib/ruby/gems/1.8/gems/unicorn-4.0.1/lib/unicorn/launcher.rb:46 - end of file reached

编辑

感谢 jdeseno,我已经通过自己创建 tmp 文件夹解决了这个问题。但现在我收到了一个不同的错误:

{:daemonize=>true,
 :app=>
  #<Proc:0x00002b90ee5098a8@/usr/local/lib/ruby/gems/1.8/gems/unicorn-4.1.1/bin/unicorn_rails:135>,
 :unicorn_options=>{:config_file=>"config/unicorn.rb", :listeners=>[]}}
Exception `EOFError' at /usr/local/lib/ruby/gems/1.8/gems/unicorn-4.1.1/lib/unicorn/launcher.rb:46 - end of file reached

对此错误有什么想法吗?错误消息没有提供太多帮助。

I'm getting this very strange error when I attempt to start my rails application with unicorn. Has anyone seen this before?

[root@Web01 mp_app]# unicorn_rails -c config/unicorn.rb -E production -D -d
{:daemonize=>true,
 :app=>
  #<Proc:0x00002b14fff8c890@/usr/local/lib/ruby/gems/1.8/gems/unicorn-4.0.1/bin/unicorn_rails:135>,
 :unicorn_options=>{:config_file=>"config/unicorn.rb", :listeners=>[]}}
Exception `Errno::ENOENT' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - No such file or directory - tmp/cache
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - .
Exception `EOFError' at /usr/local/lib/ruby/gems/1.8/gems/unicorn-4.0.1/lib/unicorn/launcher.rb:46 - end of file reached

EDIT

Thanks to jdeseno, I've solved this by creating the tmp folder myself. But now I'm getting a different error:

{:daemonize=>true,
 :app=>
  #<Proc:0x00002b90ee5098a8@/usr/local/lib/ruby/gems/1.8/gems/unicorn-4.1.1/bin/unicorn_rails:135>,
 :unicorn_options=>{:config_file=>"config/unicorn.rb", :listeners=>[]}}
Exception `EOFError' at /usr/local/lib/ruby/gems/1.8/gems/unicorn-4.1.1/lib/unicorn/launcher.rb:46 - end of file reached

Any ideas on this error? The error message doesn't give much help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橘味果▽酱2024-12-18 08:54:24

在使用 Unicorn 部署 Rails 站点时,我曾两次遇到来自 launcher.rb:46EOFError 问题。在每种情况下,解决方案都是删除 /tmp 并让 Unicorn 创建它。

我知道您专门手动创建了 /tmp 来解决不同的问题...但也许真正的问题是文件权限或类似的东西阻止 Unicorn 创建 /tmp

I've encountered the EOFError from launcher.rb:46 problem twice when deploying Rails sites using Unicorn. In each case, the solution was to delete /tmp and let Unicorn create it.

I know that you created /tmp manually specifically to solve a different problem... but maybe the real problem was that file permissions or something similar was stopping Unicorn from creating /tmp.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文