2011-10-23 61 views
8

当我尝试启动我的Rails应用程序与独角兽时,我得到这个非常奇怪的错误。有没有人见过这个?奇怪的错误,当我开始与独角兽我的Rails应用程序

[[email protected] mp_app]# unicorn_rails -c config/unicorn.rb -E production -D -d 
{:daemonize=>true, 
:app=> 
    #<Proc:[email protected]/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:[email protected]/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 

对此错误的任何想法?错误消息没有提供太多帮助。

+1

错误意味着'tmp'目录不存在,独角兽不会为您创建它。尝试创建它或检查您的独角兽配置中的'working_dir'设置。 – jdeseno

回答

2

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

我知道你手动创建/tmp专门解决一个不同的问题......但也许真正的问题是文件权限或类似的东西停止独角兽创建/tmp

+0

这对我工作谢谢! – ashga

相关问题