0

I've been debugging this for about a week now with no progress so I thought I'd take it to here. I've been doing research and staring at other StackOverflow solutions for this for hours and haven't made any progress. Currently running puma-dev on ruby 2.6.5. Whenever I run puma-dev this is the error message I get. (changing project names and some others for security reasons):

* Directory for apps: /Users/(myname)/.puma-dev
* Domains: test
* DNS Server port: 9253
* HTTP Server port: 9280
* HTTPS Server port: 9283
! Puma dev running...
! Booting app 'docugenerator-02fe76f7' on socket /Users/(myname)/.puma-dev/docugen/tmp/puma-dev-3410.sock
docugenerator-02fe76f7[3421]: sh: no job control in this shell
docugenerator-02fe76f7[3421]: Puma starting in single mode...
docugenerator-02fe76f7[3421]: * Version 4.3.8 (ruby 2.6.3-p62), codename: Mysterious Traveller
docugenerator-02fe76f7[3421]: * Min threads: 0, max threads: 5
docugenerator-02fe76f7[3421]: * Environment: development
docugenerator-02fe76f7[3421]: ! Unable to load application: Bundler::RubyVersionMismatch: Your Ruby version is 2.6.3, but your Gemfile specified 2.6.5
docugenerator-02fe76f7[3421]: /Library/Ruby/Gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:495:in `validate_ruby!': Your Ruby version is 2.6.3, but your Gemfile specified 2.6.5 (Bundler::RubyVersionMismatch)

Things I have tried so far are:

  • Reinstalling puma-dev
  • Restarting computer
  • Changing .env and .powenv
  • Changing rbenv global to 2.6.5

So far I've made no progress and I just get an error everytime I reload the page or restart the puma-dev server. Any tips or help is appreciated.

Skyler
  • 33
  • 7

1 Answers1

0

It seems that the puma is running in wrong ruby version. rbenv determines which ruby version to use by several ways (see: https://github.com/rbenv/rbenv#choosing-the-ruby-version ), and you need make sure the order of ruby versions that rbenv try to determines is correct. The most straightforward way is to create a .ruby-version in your project.

.ruby-version

2.6.5
Sibevin Wang
  • 4,480
  • 3
  • 27
  • 27
  • Hey Sibevin. My project already has this and is set to the correct ruby version. – Skyler Apr 07 '22 at 20:05
  • It's weird. I never use `puma-dev` before and I guess it may be related to the configuration of `puma-dev`. A possible solution is to set environment on `puma-dev` configuration to make sure it uses the right ruby version. – Sibevin Wang Apr 08 '22 at 02:11