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?
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.
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.
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.
If you write the following in the Gemfile:
gem 'rmagick', :require => 'RMagick'
try rewriting like this:
gem 'rmagick'
https://github.com/gemhome/rmagick#installing-via-bundler
Just upgrade the gem with the bearer and he should do it.
bundle update carrierwave
If you are using the Carrierwave gem, you had to try downgrading to 0.7.0, add "carrierwave", "0.7.0" to your gemfile, and then run "bundle update carrierwave" in the console