0
我已經通過MacPorts在OSX上安裝了RMagick,並可以通過運行'gem server'來查看它。然而,當我試圖把它列入我的腳本中使用要求'RMagick'不起作用?
require 'rubygems'
require 'RMagick'
它崩潰,出現以下錯誤消息
./RMagick.rb:4:in `show_info': uninitialized constant Magick (NameError)
from ./RMagick.rb:24
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from ./rmagick.rb:1
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from get_pixels.rb:2
誰能告訴我什麼,我做錯了嗎?
你能告訴周圍的背景下'/ RMagick.rb',線4-24? – 2010-04-18 16:40:43