2011-10-23 3 views
8

유니콘으로 레일 애플리케이션을 시작하려고하면 아주 이상한 오류가 발생합니다. 이걸 본 사람 있어요?유니콘으로 레일 앱을 시작하면 이상한 오류가 발생합니다.

[[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' 디렉토리가 존재하지 않으며 unicorn이 생성하지 않는다는 것을 의미합니다. 그것을 만들거나 유니콘 설정에서'working_dir' 설정을 확인하십시오. – jdeseno

답변

2

유니콘을 사용하여 Rails 사이트를 배포 할 때 에서 두 번째로 launcher.rb:46 문제가 발생했습니다. 각각의 경우에 해결책은 /tmp을 삭제하고 Unicorn이이를 생성하도록하는 것이 었습니다.

나는 다른 문제를 해결하기 위해 수동으로 /tmp을 만들었다는 것을 안다.하지만 어쩌면 진짜 문제는 유니콘이 파일을 만들지 못하게하는 것이다. /tmp.

+0

이것은 나를 위해 고마워! – ashga