darkinsyde
darkinsyde

Reputation: 256

'puma: command not found' error after updating ElasticBeanstalk platform

I have a ruby 3.2.2 project running on aws eb with Ruby 3.2 running on 64bit Amazon Linux 2023/4.0.0 platform and everything is working. I'm trying to upgrade the platform version from 4.0.0 to 4.3.1 and it fails while deploying.

The error comes from procfile = web: puma -C /opt/elasticbeanstalk/config/private/pumaconf.rb

And the error is = puma: command not found

Bundle completes successfully before this stage and i see puma is also being installed:

Fetching puma 6.5.0
Installing puma 6.5.0 with native extensions

I need to upgrade ruby 3.3, but they only have 4.3.1 available for that, so staying on 4.0.0 is not an option. I also deployed 3.3 version and it also fails with the same error.

I couldn't find much about what can be the cause of this. Appreciate for any suggestion.

Upvotes: 0

Views: 37

Answers (1)

darkinsyde
darkinsyde

Reputation: 256

I find out interesting logs from both versions. After the bundle install, there is a control to see if puma is installed or not.

From 4.0.0:

2025/01/31 06:27:49.325372 [INFO] Did not find puma in installed bundles
2025/01/31 06:27:49.325376 [INFO] Installing puma and nio4r since no version of puma found in installed bundles

From 4.3.1:

2025/01/31 06:09:29.967405 [INFO] Checking if puma is found in installed bundles
2025/01/31 06:09:29.967422 [INFO] Running command: bundle info puma
2025/01/31 06:09:30.909448 [INFO]   * puma (6.5.0)

Even though i included puma in the gemfile, 4.0.0 is not able to locate it and installs it itself. But 4.3.1 is able to locate it, but can not find it afterwards...

For the solution, i moved puma gem to development group, now 4.3.1 also installs it. No idea why these platforms behave like that though.

Upvotes: 0

Related Questions