puma / puma-dev

A tool to manage rack apps in development with puma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exec: puma: not found

kalvinwang opened this issue · comments

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 ruby@2.7.8

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>'

I'm getting the same error

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.