About ruby on rails, hackintosh, iphone3g and etc.
Tuesday, December 15, 2009
Install Nokogiri on Leopard
Saturday, December 5, 2009
CORE_RL_magick_.dll not found
Using RMagick to add text to image
require 'rubygems'
require 'RMagick'
include Magick
image = Image.new(50, 50) {
self.background_color = "white"
}
text = Draw.new
text.annotate(image, 0,0,0,40, 'Named Colors') {
self.fill = 'black'
self.pointsize = 32
}
image.write("image.png")
Installing RMagick in Snow Leopard
Today I also got my SnowLeopard copy and updated my 10.5 System to 10.6. Yeah well, as you, I had some problems with the RoR installation but after about 4 hours I finally got it.
In your blog, you asked for some tips about the RMagick installation. First of all, the mentioned script installs some outdated versions, that’s why I used another way. First of all, I installed the current version of MacPorts (for SnowLeopard).
http://distfiles.macports.org/MacPorts/MacPorts-1.8.0-10.6-SnowLeopard.dmg
Then I tried just to install ImageMagick, that failed for me, because of libxml2 compiled for the i386 architecture. So you have to recompile / update it first.
sudo port install libxml2
sudo port install ImageMagick
It was enough for to have a running x64 version of ImageMagick on SL. It could be, that some other libs are compiled in i386, too. Than you have to update it first before compiling ImageMagick.
My next step was the installation of the RMagick gem. It’s maybe a bug, but after my first run of
sudo gem install rmagick
I get the error, that rmagick was configured for a wrong version if ImageMagick, after the second run of the gem install rmagick, I hat a working solution.