unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
* Unicorn could not find log file
@ 2017-02-05  8:21 Aashish Kiran
  2017-02-05  8:37 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Aashish Kiran @ 2017-02-05  8:21 UTC (permalink / raw)
  To: unicorn-public

Hi,
I facing the following error, inspite of creating
~/apps/voice_rules/shared/log/unicorn.stderr.log.
Can you help.


$ bundle exec unicorn -c config/unicorn.rb

/home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:762:in
`initialize': No such file or directory @ rb_sysopen -
~/apps/voice_rules/shared/log/unicorn.stderr.log (Errno::ENOENT)
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:762:in
`open'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:762:in
`redirect_io'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:164:in
`stderr_path='
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/lib/unicorn/configurator.rb:108:in
`block in commit!'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/lib/unicorn/configurator.rb:105:in
`each'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/lib/unicorn/configurator.rb:105:in
`commit!'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:102:in
`initialize'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/bin/unicorn:126:in
`new'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/bin/unicorn:126:in
`<top (required)>'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/bin/unicorn:23:in
`load'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/bin/unicorn:23:in
`<main>'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/bin/ruby_executable_hooks:15:in
`eval'
    from /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/bin/ruby_executable_hooks:15:in
`<main>'

thanks,
Aashish Kiran

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Unicorn could not find log file
  2017-02-05  8:21 Unicorn could not find log file Aashish Kiran
@ 2017-02-05  8:37 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2017-02-05  8:37 UTC (permalink / raw)
  To: Aashish Kiran; +Cc: unicorn-public

Aashish Kiran <aashish.kiran@gmail.com> wrote:
> Hi,
> I facing the following error, inspite of creating
> ~/apps/voice_rules/shared/log/unicorn.stderr.log.
> Can you help.
> 
> 
> $ bundle exec unicorn -c config/unicorn.rb
> 
> /home/chittimilla/.rvm/gems/ruby-2.2.3@voice_rules/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:762:in
> `initialize': No such file or directory @ rb_sysopen -
> ~/apps/voice_rules/shared/log/unicorn.stderr.log (Errno::ENOENT)

I guess you have the literal "~/" in your config/unicorn.rb?

Instead of the "~/", you should probably have the value of
the HOME environment variable.

In other words, use:

  stderr_path "#{ENV['HOME']}/apps/voice_rules/shared/log/unicorn.stderr.log"

Not this:

  stderr_path "~/apps/voice_rules/shared/log/unicorn.stderr.log"


The "~/" is only evaluated to be the value of ENV['HOME']
by your shell (probably bash if you use a GNU/Linux system).
Most other tools (like unicorn) will interpret '~/' literally.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-05  8:21 Unicorn could not find log file Aashish Kiran
2017-02-05  8:37 ` Eric Wong

unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/unicorn-public
	git clone --mirror http://ou63pmih66umazou.onion/unicorn-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.unicorn

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox