I have a long list of warnings recently when I start my rails server. Although it doesn't affect my application, I am wondering how I can resolve the warnings. My estimate is that imagemagick is somehow called twice?
when I check my git log before and after the warnings. I am wondering how to resolve this.
- bcrypt-ruby (3.1.2)
- better_errors (1.0.1)
+ bcrypt (3.1.7)
+ bcrypt-ruby (3.1.5)
- bcrypt (>= 3.1.3)
+ better_errors (1.1.0)
Has bcrypt have anything to do with imagemagick?
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/http/mime_type.rb:166: warning: already initialized constant Mime::PDF
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/http/mime_type.rb:166: warning: previous definition of PDF was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:44: warning: already initialized constant Magick::PercentGeometry
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:44: warning: previous definition of PercentGeometry was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:45: warning: already initialized constant Magick::AspectGeometry
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:45: warning: previous definition of AspectGeometry was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:46: warning: already initialized constant Magick::LessGeometry
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:46: warning: previous definition of LessGeometry was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:47: warning: already initialized constant Magick::GreaterGeometry
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:47: warning: previous definition of GreaterGeometry was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:48: warning: already initialized constant Magick::AreaGeometry
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:48: warning: previous definition of AreaGeometry was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:49: warning: already initialized constant Magick::MinimumGeometry
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:49: warning: previous definition of MinimumGeometry was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:52: warning: already initialized constant Magick::Geometry::FLAGS
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:52: warning: previous definition of FLAGS was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:53: warning: already initialized constant Magick::Geometry::RFLAGS
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:53: warning: previous definition of RFLAGS was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:92: warning: already initialized constant Magick::Geometry::W
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:92: warning: previous definition of W was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:93: warning: already initialized constant Magick::Geometry::H
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:93: warning: previous definition of H was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:94: warning: already initialized constant Magick::Geometry::X
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:94: warning: previous definition of X was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:95: warning: already initialized constant Magick::Geometry::Y
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:95: warning: previous definition of Y was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:96: warning: already initialized constant Magick::Geometry::RE
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:96: warning: previous definition of RE was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:147: warning: already initialized constant Magick::Draw::ALIGN_TYPE_NAMES
...
...
...
...
2.13.2/lib/RMagick.rb:750: warning: already initialized constant Magick::IPTC::Application::ObjectData_Preview_File_Format
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:750: warning: previous definition of ObjectData_Preview_File_Format was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:751: warning: already initialized constant Magick::IPTC::Application::ObjectData_Preview_File_Format_Version
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:751: warning: previous definition of ObjectData_Preview_File_Format_Version was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:752: warning: already initialized constant Magick::IPTC::Application::ObjectData_Preview_Data
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:752: warning: previous definition of ObjectData_Preview_Data was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:756: warning: already initialized constant Magick::IPTC::Pre_ObjectData_Descriptor::Size_Mode
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:756: warning: previous definition of Size_Mode was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:757: warning: already initialized constant Magick::IPTC::Pre_ObjectData_Descriptor::Max_Subfile_Size
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:757: warning: previous definition of Max_Subfile_Size was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:758: warning: already initialized constant Magick::IPTC::Pre_ObjectData_Descriptor::ObjectData_Size_Announced
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:758: warning: previous definition of ObjectData_Size_Announced was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:759: warning: already initialized constant Magick::IPTC::Pre_ObjectData_Descriptor::Maximum_ObjectData_Size
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:759: warning: previous definition of Maximum_ObjectData_Size was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:763: warning: already initialized constant Magick::IPTC::ObjectData::Subfile
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:763: warning: previous definition of Subfile was here
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:767: warning: already initialized constant Magick::IPTC::Post_ObjectData_Descriptor::Confirmed_ObjectData_Size
/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:767: warning: previous definition of Confirmed_ObjectData_Size was here
In my case, with stop requiring it in my gemfile worked:
gem 'rmagick', require: false
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