Tuesday, 27 February 2024

an error occurred while installing psych (5.1.2) and bundler cannot continue. windows. Error with psych gem in Ruby on rails

 An error occurred while installing psych (5.1.2), and Bundler cannot continue.

The psych gem does neither install nor run the bundle, In this context I followed the following steps to rectify this error:

1. Update the gems using the following command

gem update

2. bundle install --gemfile

3.  gem update psych --platform=ruby

4. bundle install

5. gem update --system

6. gem pristine openssl --version 3.2.0

7.  Add the below line to the end of your GEMFILE

gem 'psych', '5.1.1'

Then Run the bundle install

bundle i