The "RMagick" requirement has been deprecated. Use "rmagick" instead. Factorygirl
When I create an object via FactoryGirl and Faker the shell shows me an error
[1] pry(main)> FactoryGirl.create(:company)
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
but when i create an object in db development it is ok
there is a factory
factory :company do
title Faker::Company.name
image Faker::Avatar.image("my-own-slug", "200x200")
end
how to fix?
source to share
This is definitely a CarrierWave charge when the execution is on your line image Faker::Avatar.image("my-own-slug", "200x200")
.
There is a problem on CarrierWave that closes and the fix is merged. Either you include github commit in your GemFile, or you are waiting for the next gem release.
source to share
First, most people will want to include rmagick in their package like this:
gem 'rmagick', require: false
Secondly, rmagick 2.15.0 has just been released. (Find your version with bundle list
.) Update gem to version 2.15.0 with bundle update
.
At this point, you can still get the error as a pull request to remove it on github , but not merged yet.
source to share
It's very late, but it might help someone:
gem 'carrierwave', :github => 'satoruk/carrierwave' , :ref => '43179f94d6a4e62f69e812f5082d6447c9138480'
gem 'rmagick', require: false
This should give you the rmagick fix version. I don't know why they don't merge it with the master.
Hope it helps.
source to share