[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

install rmagick in win32,but no work

yang jdong

3/14/2006 3:10:00 AM

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?

--
Posted via http://www.ruby-....


8 Answers

Tim Hunter

3/14/2006 1:00:00 PM

0

Did you run the postinstall.rb script?

See http://rmagick.rubyforge.org/instal...

yang jdong

3/14/2006 1:14:00 PM

0

rmagick@gmail.com wrote:
> Did you run the postinstall.rb script?
>
> See http://rmagick.rubyforge.org/instal...

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

Then run

postinstall.rb

it success.

--
Posted via http://www.ruby-....


Tim Hunter

3/14/2006 3:28:00 PM

0

Did you set up the RubyGems environment?

See http://docs.rubygems.org/read/chapte...

yang jdong

3/15/2006 1:00:00 AM

0

rmagick@gmail.com wrote:
> Did you set up the RubyGems environment?
>
> See http://docs.rubygems.org/read/chapte...

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

--
Posted via http://www.ruby-....


Tim Hunter

3/15/2006 1:08:00 AM

0

yang jdong wrote:
> rmagick@gmail.com wrote:
>
>>Did you set up the RubyGems environment?
>>
>>See http://docs.rubygems.org/read/chapte...
>
>
> 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
>

The 'false' return value from require is meaningless when you're using
RubyGems. Try this:

require 'rubygems'
require 'RMagick'

puts Magick::Long_version

Daniel Harple

3/15/2006 1:13:00 AM

0

On Mar 15, 2006, at 1:59 AM, yang jdong wrote:

> rmagick@gmail.com wrote:
>> Did you set up the RubyGems environment?
>>
>> See http://docs.rubygems.org/read/chapte...
>
> 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

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.cg...
rmagick.gemspec?root=rmagick&view=log


Jim Weirich

3/15/2006 4:04:00 AM

0

yang jdong wrote:
> rmagick@gmail.com wrote:
>> Did you set up the RubyGems environment?
>>
>> See http://docs.rubygems.org/read/chapte...
>
> 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



--
Posted via http://www.ruby-....


yang jdong

3/15/2006 7:45:00 AM

0

require 'rubygems'
require 'RMagick'

puts Magick::Long_version

it is ok.Thanks.

--
Posted via http://www.ruby-....