In my case, I had all my own libraries installed under vendor / bundle , because we use bundle install --deployment on our servers.
In this setting, neither gem pristine rmagick nor gem uninstall rmagick; gem install vendor/cache/rmagick-<version>.gem gem uninstall rmagick; gem install vendor/cache/rmagick-<version>.gem did not help.
I had to remove vendor / bundle and run bundle install again --deployment rm -r vendor/bundle; bundle install --deployment rm -r vendor/bundle; bundle install --deployment .
These commands must be run from the root directory of the rails application.
RajaRaviVarma
source share