Why is Heroku's heroku-18 stack only compatible with Puma versions 3.7.x?
The Heroku-16 stack is based on Ubuntu 16.04, which ships with OpenSSL 1.0.2 while the Heroku-18 stack is based on Ubuntu 18.04 which ships with OpenSSL 1.1.0.
Between these OpenSSL versions, there were quite some API and behavior changes which often requires some changes to software using OpenSSL APIs directly (like Puma does).
In Puma 3.7.0, there was a change to make it compatible with OpenSSL 1.1.0 which thus makes it the first version to be compatible with that version.
How can I solve this trouble to deploy a Rails App to Heroku?
I am posting solution might be late but can help other.
Solution most people posting asking to upgrade ruby version. Updating ruby version in an application might be time consuming some time.
But with below solution application can deploy without updating ruby version.
Current stack heroku uses is heroku-18, Having image of Ubuntu 18.04. It have minimum supported runtime is ruby 2.4.5
, other information here.
To run aplication with below this ruby version you need to downgrade heroku stack for your application.
Open console and run heroku stack
you will find.
cedar-14
container
heroku-16
* heroku-18
You need to downgrade to stack which support your ruby version. For ruby 2.3.x
you can set heroku-16
heroku stack:set heroku-16
Now if you run heroku stack
you will find heroku-16
stack set for your application.
cedar-14
container
* heroku-16
heroku-18
You might get security vulnerability issue on console, Information here.
Try update only sprockets gem to minimum 3.7.2
like:
bundle update sprockets --bundler '3.7.2'
Or you can set :
config.assets.compile = false # Disables security vulnerability
Run git push heroku master
. Boom!! Your application deployed successfully.
Related Topics
Mechanize and Ntlm Authentication
How to Read a Clients Windows Login Name Using Ruby on Rails
How to Create Automatically a Instance of Every Class in a Directory
How to Iterate Through This JSON Document Using Ruby
Run Ruby Script That Is Stored on Internet
How to Fill Out Login Form with Mechanize in Ruby
Why Do Numeric String Comparisons Give Unexpected Results
Gitlab: Invocation of Gitlab-Shell
Elegant Way to Only Show Records If They Exist in Rails Erb
Ruby: Calculate Time Difference Between 2 Times
Ruby Dynamically Naming Arrays
Rails, Ruby, How to Count and Sort, Display Top Results
Config Undefined in Environment Specific Configuration Files
How to Use String Methods on Utf-8 Characters
Openuri Causing 401 Unauthorized Error with Https Url