开发者

"gem install wxruby" but require 'wxruby' won't work

开发者 https://www.devze.com 2023-01-09 16:34 出处:网络
I did gem install wxruby on Win 7 and in Ruby 1.8.6 require \'rubygems\' require \'wxruby\' but it will say

I did

 gem install wxruby

on Win 7

and in Ruby 1.8.6

require 'rubygems'
require 'wxruby'

but it will say

开发者_如何学运维c:/ruby1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- wxruby (LoadError)
from c:/ruby1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from go.rb:5

Update: I changed it to require 'wx' and it is now saying MSVCP71.dll missing... I am somewhat hesitant to download a dll and run it from a random site if it is not from MS's official website.


I had trouble installing wxruby under x64 ubuntu linux, so I tried under Windows 7, what worked for me was:

  1. Obtaining the ruby-1.9.1p378.7z from http://rubyforge.org/frs/?group_id=167 (The p479 patch level is broken, dont use it)
  2. Additionally get the development kit from the same page
  3. Extract ruby to some convienient directory, let it be for example C:/ruby
  4. Extract the development kit to your ruby directory
  5. Start -> Computer (right click and select properties), select 'advanced system settings on the left', 'environmental variables', and append C:/ruby/bin to your PATH variable
  6. gem install wxruby-ruby19 (plain wxruby wouldnt work on 1.9 ruby)

Then just requiring 'wx' should work in your scripts, at least I dont seem to need to require rubygems.


I think wxruby has their own windows ruby distributable's, don't they? That might have all the dependencies you need...

0

精彩评论

暂无评论...
验证码 换一张
取 消