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:
- Obtaining the ruby-1.9.1p378.7z from http://rubyforge.org/frs/?group_id=167 (The p479 patch level is broken, dont use it)
- Additionally get the development kit from the same page
- Extract ruby to some convienient directory, let it be for example C:/ruby
- Extract the development kit to your ruby directory
- 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
- 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...
精彩评论