Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec: puma: not found #341

Open
kalvinwang opened this issue Apr 18, 2024 · 3 comments
Open

exec: puma: not found #341

kalvinwang opened this issue Apr 18, 2024 · 3 comments

Comments

@kalvinwang
Copy link

kalvinwang commented Apr 18, 2024

I've followed the install instructions and set up the symlink, but when loading the app it says puma not found. I saw a few Github issues from years ago with the same error but haven't found them useful. If anyone can help I'd appreciate it!

I use mise, formerly named rtx, similar to asdf, for managing Ruby versions.

bundle exec puma runs fine as it always has and the gem is installed

gem list puma

*** LOCAL GEMS ***

puma (6.3.1)

I've run mise use -g [email protected]

ruby -v
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [arm64-darwin22]

puma-dev.log shows:

! Detecting app 'platform-0705271a' dying on start
! Booting app 'platform-0705271a' on socket /Users/kalvin/.puma-dev/platform/tmp/puma-dev-64863.sock
platform-0705271a[69258]: bash: line 27: exec: puma: not found
! Killing 'platform-0705271a' (69258) - 'stdout/stderr closed'

Running puma-dev in foreground gives me a more useful error, it looks like it tries to load my system ruby even though it's starting from my mise managed ruby?

! Detecting app 'platform-0705271a' dying on start
! Booting app 'platform-0705271a' on socket /Users/kalvin/.puma-dev/platform/tmp/puma-dev-72090.sock
platform-0705271a[72170]: /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem puma (>= 0.a) with executable puma (Gem::GemNotFoundException)
platform-0705271a[72170]: 	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
platform-0705271a[72170]: 	from /Users/kalvin/.local/share/mise/installs/ruby/2.7.8/bin/puma:23:in `<main>'
@antarr
Copy link

antarr commented May 22, 2024

I'm getting the same error

@tulioti
Copy link

tulioti commented Jun 10, 2024

It's because the puma-dev is using the ruby from your system. To fix this error it's necessary use to use the shims. In mise you can use mise activate --shims.

@dgholz
Copy link

dgholz commented Oct 11, 2024

I used the .pumaenv file to set it up:

command -v mise >/dev/null && eval "$(mise activate --shims)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants