require, RMagick, and case sensitivity

(At least on Leopard with Ruby 1.8.6)

Ruby will try to reload rmagick if you get the case of rmagick different from the original require. And when that happens it all goes up the whop.

We were using attachment_fu’s image magick processor, then doing a require ‘rmagick’ seperately which resulted in tonnes of errors like this

/usr/local/lib/ruby/gems/1.8/gems/rmagick-1.15.10/lib/rmagick.rb:32:
  warning: already initialized constant PercentGeometry

Keep your case’s of require’s consistent. Even if this is file system dependent behaviour in mixed development environments you can imagine how weird problems could get!

No Comments, Comment or Ping

Reply to “require, RMagick, and case sensitivity”

About

Rowan is a Director of Technology for a large marketing services company, specialising in architecting, developing and putting web applications into production - in particular Ruby on Rails based apps. He lives in Toronto, Canada but speaks in a funny accent as he's originally from New Zealand. He's been working in the software and web business for over a decade. This blog covers Web Application development and deployment in the real world, dealing with topics from business fundamentals to Ruby on Rails, Merb, PHP, Flex, MySQL, Apache and more.

Read more ...

 

 

View Rowan Hick's profile on LinkedIn

 

Subscribe to my RSS feed