Bundler 2.2.3 and deployment of Ruby apps

20-Apr-2021 1073
As per the warning it seems that my Gemfile was generated for Mac OS X but I am deploying to Linux and it was raising a flag. Kudos to Heroku buildpack to raise a user friendly error message!A lot of gems such as nokogiri ship platform specific releases. In previous versions of Bundler, the approach for detecting the platform specific version was error-prone as per this comment. To mitigate such errors, bundler now sets up Gemfile.lock for the platform on which it was generated.When deploying to Heroku, the Heroku Ruby buildpack runs bundle install in deployment mode. It expects that Gemfile.lock to be frozen and already compatible with the platform on which it is being run. In our case, the Gemfile.lock is not compatible with the platform on which Heroku is deploying which is Linux and the platform on which it was generated which is Mac.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle