When I create an object via FactoryGirl and Faker, shell show me an error
[1] pry(main)> FactoryGirl.create(:company)
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
but when I create object in development db - it's ok
there is factory
factory :company do
title Faker::Company.name
image Faker::Avatar.image("my-own-slug", "200x200")
end
how fix?
This is most certainly dues to CarrierWave when the execution comes to your line image Faker::Avatar.image("my-own-slug", "200x200")
.
There is an issue on CarrierWave which is closed now and the fix is merged. Either you include the github commit in your GemFile, or you wait for the next gem release.
First, most people will want to include rmagick in their bundle like this:
gem 'rmagick', require: false
Second, rmagick 2.15.0 was just released. (Find your version with bundle list
.) Upgrade the gem to version 2.15.0 with bundle update
.
At this point you may still get the error as a pull request to remove it is on github but has not been merged yet.
This is very late however it might help someone:
gem 'carrierwave', :github => 'satoruk/carrierwave' , :ref => '43179f94d6a4e62f69e812f5082d6447c9138480'
gem 'rmagick', require: false
This should give you the version with rmagick fixed. I am not sure why they don't merge it to the master.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With