简体   繁体   中英

Weird error when I start my rails app with unicorn

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM