puma / puma-dev

A tool to manage rack apps in development with puma
BSD 3-Clause "New" or "Revised" License
1.74k stars 107 forks source link

Can't avoid using ZSH, how to set SHELL properly? #295

Open hopewise opened 2 years ago

hopewise commented 2 years ago

I am trying to let puma-dev to use /bin/sh instead of /bin/zsh , I tried to set the content of .pumaenv as:

export SHELL=/bin/sh

but when I look into logs, I see:

! Booting app 'backend-4cc1c336' on socket /Users/samir/.puma-dev/admin.myapp/tmp/puma-dev-13166.sock
backend-4cc1c336[71323]: tput: No value for $TERM and no -T specified
backend-4cc1c336[71323]:
backend-4cc1c336[71323]: [ERROR]: gitstatus failed to initialize.
backend-4cc1c336[71323]:
backend-4cc1c336[71323]:   Your Git prompt may disappear or become slow.
backend-4cc1c336[71323]:
backend-4cc1c336[71323]:   Zsh log (/private/var/folders/75/twcpcdqj7q323p_ldn9ss0fc0000gn/T/gitstatus.MY.501.71323.1642690646.1.xtrace.log):
backend-4cc1c336[71323]:
backend-4cc1c336[71323]:     +(anon):7> setopt monitor
backend-4cc1c336[71323]:     (anon):setopt:7: can't change option: monitor
backend-4cc1c336[71323]:     +(anon):7> return
backend-4cc1c336[71323]:
backend-4cc1c336[71323]:   System information:
backend-4cc1c336[71323]:
backend-4cc1c336[71323]:     zsh:      5.8
backend-4cc1c336[71323]:     uname -a: Darwin 192.168.1.103 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64
backend-4cc1c336[71323]:
backend-4cc1c336[71323]:   If you need help, open an issue and attach this whole error message to it:
backend-4cc1c336[71323]:
backend-4cc1c336[71323]:     https://github.com/romkatv/gitstatus/issues/new
backend-4cc1c336[71323]: Puma starting in single mode...
backend-4cc1c336[71323]: * Version 4.3.10 (ruby 2.5.0-p0), codename: Mysterious Traveller
backend-4cc1c336[71323]: * Min threads: 0, max threads: 5
backend-4cc1c336[71323]: * Environment: development
backend-4cc1c336[71323]: WARNING: Nokogiri was built against LibXML version 2.9.12, but has dynamically loaded 2.9.4
backend-4cc1c336[71323]: /Users/samir/.asdf/installs/ruby/2.5.0/lib/ruby/gems/2.5.0/gems/redis-3.2.2/lib/redis/client.rb:441: warning: constant ::Fixnum is deprecated
backend-4cc1c336[71323]: /Users/samir/.asdf/installs/ruby/2.5.0/lib/ruby/gems/2.5.0/gems/redis-3.2.2/lib/redis/client.rb:441: warning: constant ::Fixnum is deprecated
backend-4cc1c336[71323]: * Listening on unix:/Users/samir/.puma-dev/admin.myapp/tmp/puma-dev-13166.sock
backend-4cc1c336[71323]: Use Ctrl-C to stop
! App 'backend-4cc1c336' booted

so, you that there is a Zsh log related.. All what I did is to restart puma-dev after setting the content of .pumaenv as above.

Any idea?

nonrational commented 2 years ago

I'm not sure what you're trying to accomplish. Are you trying to run puma-dev under ZSH? Or trying to change the shell that runs puma under the hood?

nonrational commented 2 years ago

Sidenote: Currently, puma-dev won't pick up SHELL set inside any of the supported env files. It needs to be set during the invocation of puma-dev.

I'm currently working on a change to source all the puma env files before checking SHELL to provide better env flexibility and, hopefully, fix some of the issues folks have been having working with different ruby versions.