i use instantRails 1.0 on winxp.download
‘RMagick-1.9.2-IM-6.2.4-6-win32.zip’ from www
after install,i write code in irb:
require ‘RMagick’
it shows follow errors:
no such file to load – RMagick.
why?
i use instantRails 1.0 on winxp.download
‘RMagick-1.9.2-IM-6.2.4-6-win32.zip’ from www
after install,i write code in irb:
require ‘RMagick’
it shows follow errors:
no such file to load – RMagick.
why?
[email protected] wrote:
Did you run the postinstall.rb script?
yes,
i do:
gem install RMagick-win32-1.x.x-mswin32.gem
Then run
postinstall.rb
it success.
[email protected] wrote:
Did you set up the RubyGems environment?
C:\Documents and Settings\yang>irb
irb(main):001:0> require ‘rubygems’
=> true
irb(main):002:0> require ‘RMagick’
=> false
irb(main):003:0> exit
On Mar 15, 2006, at 1:59 AM, yang jdong wrote:
irb(main):003:0> exit
Try using it – just because require returns false does not mean it
failed. The library’s gemspec probably used autorequire.[1]
[1] and removed it. http://rubyforge.org/cgi-bin/viewcvs.cgi/RMagick/
rmagick.gemspec?root=rmagick&view=log
yang jdong wrote:
irb(main):002:0> require ‘RMagick’
=> false
irb(main):003:0> exit
The ‘false’ return value from require is meaningless when you’re using
RubyGems. Try this:
require ‘rubygems’
require ‘RMagick’
puts Magick::Long_version
yang jdong wrote:
[email protected] wrote:
Did you set up the RubyGems environment?
C:\Documents and Settings\yang>irb
irb(main):001:0> require ‘rubygems’
=> true
irb(main):002:0> require ‘RMagick’
=> false
Require returning ‘false’ does not mean that it has failed. It just
means that the library has been already loaded. If the RMagick gem does
an autorequire on the RMagick file, then that file will be loaded during
the activation of the RMagick gem, meaning that by the time your require
finishes, the file is indeed loaded.
–
– Jim W.
require ‘rubygems’
require ‘RMagick’
puts Magick::Long_version
it is ok.Thanks.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs