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.
Fdb75dcc7b1163a9c84532122907e45b?d=identicon&s=25 Yang Jdong (adong)
on 2006-03-14 04: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?
B33ea5c12d767bfd1253940a960274f5?d=identicon&s=25 rmagick@gmail.com (Guest)
on 2006-03-14 14:05
(Received via mailing list)
Did you run the postinstall.rb script?

See http://rmagick.rubyforge.org/install-faq.html
Fdb75dcc7b1163a9c84532122907e45b?d=identicon&s=25 Yang Jdong (adong)
on 2006-03-14 14:13
rmagick@gmail.com 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.
B33ea5c12d767bfd1253940a960274f5?d=identicon&s=25 rmagick@gmail.com (Guest)
on 2006-03-14 16:30
(Received via mailing list)
Did you set up the RubyGems environment?

See http://docs.rubygems.org/read/chapter/3#page70
Fdb75dcc7b1163a9c84532122907e45b?d=identicon&s=25 Yang Jdong (adong)
on 2006-03-15 01:59
rmagick@gmail.com 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
37a3c73ffbf864e4b28f7f2384ee12ce?d=identicon&s=25 Timothy Hunter (tim-hunter)
on 2006-03-15 02: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
9358cc96c46055cd68d4a76a9aefe026?d=identicon&s=25 Daniel Harple (Guest)
on 2006-03-15 02: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
10d4acbfdaccb4eee687a428ca00a5d8?d=identicon&s=25 Jim Weirich (weirich)
on 2006-03-15 05:03
yang jdong wrote:
> rmagick@gmail.com 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 Weirich
Fdb75dcc7b1163a9c84532122907e45b?d=identicon&s=25 Yang Jdong (adong)
on 2006-03-15 08:44
require 'rubygems'
require 'RMagick'

puts Magick::Long_version

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