I am using RMagick in my app and am having problems in deployment. The
deployment machine (Fedora Core 5) can’t find RMagick unless I change
the “require” syntax from that used on the dev machine (OS X). And the
dev machine doesn’t like the syntax that works on the deployment server!
To wit:
[OS X]
$ script/console
Loading development environment.
require_gem ‘rmagick’
=> trueMagick
=> Magick
$ script/console
require ‘rmagick’
=> falseMagick
=> Magick
$ script/console
Loading development environment.
Application strings file ‘config/app_strings.dat’ does not exist.
require ‘RMagick’
[DELETED: Many error of the type:
/usr/local/lib/ruby/site_ruby/1.8/RMagick.rb:32: warning: already
initialized constant PercentGeometry]
NameError: undefined methodassoc' for class
Magick::ImageList’
[Fedora Core 5]
script/console
require_gem ‘rmagick’
=> trueMagick
NameError: uninitialized constant Magick
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
const_missing' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
const_missing’
from (irb):2
script/console
require ‘rmagick’
MissingSourceFile: no such file to load – rmagick
script/console
require ‘RMagick’
=> trueMagick
=> Magick
The gem and the library are installed on both machines (maybe not
entirely correctly, it appears, but they compiled and installed).
To summarize what’s happening:
- require_gem returns true on both machines but on FC5 the library
isn’t really loading: Magick isn’t initialized. - On OS X, “require ‘rmagick’” works fine, but FC5 can’t find the
library when I spell it in all lowercase. - On FC5, “require ‘RMagick’” works fine, but on OS X using the
capitalized letters load a broken version of the library.
I’ve have recompiled and reinstalled till the cows come home. Can anyone
give me some guidance on how to set things up so that one of these three
load commands works consistently on both platforms?
Thanks!
/afb