Forum: Ruby install rmagick in win32,but no work

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Yang J. (Guest)
on 2006-03-14 05:09
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?
(Guest)
on 2006-03-14 15:05
(Received via mailing list)
Did you run the postinstall.rb script?

See http://rmagick.rubyforge.org/install-faq.html
Yang J. (Guest)
on 2006-03-14 15:13
removed_email_address@domain.invalid wrote:
> Did you run the postinstall.rb script?
>
> See http://rmagick.rubyforge.org/install-faq.html

yes,
i do:
  gem install RMagick-win32-1.x.x-mswin32.gem

Then run

  postinstall.rb

it success.
(Guest)
on 2006-03-14 17:30
(Received via mailing list)
Did you set up the RubyGems environment?

See http://docs.rubygems.org/read/chapter/3#page70
Yang J. (Guest)
on 2006-03-15 02:59
removed_email_address@domain.invalid wrote:
> Did you set up the RubyGems environment?
>
> See http://docs.rubygems.org/read/chapter/3#page70

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
Timothy H. (Guest)
on 2006-03-15 03:09
(Received via mailing list)
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
Daniel H. (Guest)
on 2006-03-15 03:12
(Received via mailing list)
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
Jim W. (Guest)
on 2006-03-15 06:03
yang jdong wrote:
> removed_email_address@domain.invalid wrote:
>> Did you set up the RubyGems environment?
>>
>> See http://docs.rubygems.org/read/chapter/3#page70
>
> 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.
Yang J. (Guest)
on 2006-03-15 09:44
require 'rubygems'
require 'RMagick'

puts Magick::Long_version

it is ok.Thanks.
This topic is locked and can not be replied to.