“gem 安装 wxruby”但需要“wxruby”行不通

发布于 2024-09-12 03:01:11 字数 579 浏览 2 评论 0原文

 gem install wxruby

在 Win 7

和 Ruby 1.8.6 上

require 'rubygems'
require 'wxruby'

执行了此操作,但它会显示

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

更新:,我将其更改为 require 'wx',现在显示 MSVCP71.dll 缺失...如果不是来自 MS 的官方网站,我有点犹豫要不要从随机站点下载 dll 并运行它。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

很快妥协 2024-09-19 03:01:15

我认为 wxruby 有自己的 windows ruby​​ 分发版,不是吗?这可能有您需要的所有依赖项......

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

ヤ经典坏疍 2024-09-19 03:01:14

我在 x64 ubuntu linux 下安装 wxruby 时遇到问题,所以我在 Windows 7 下尝试,对我有用的是:

  1. http://rubyforge.org/frs/?group_id=167 (p479补丁级别已损坏,请勿使用)
  2. 另外从同一页面获取开发套件
  3. 摘录ruby 到某个方便的目录,例如 C:/ruby
  4. 将开发套件解压到您的 ruby​​ 目录
  5. Start ->;计算机(右键单击并选择属性),选择“左侧高级系统设置”、“环境变量”,并将 C:/ruby/bin 附加到您的 PATH 变量
  6. gem install wxruby-ruby19 (普通 wxruby 不适用于 1.9 ruby​​)

然后只需要 'wx' 就可以在你的脚本中工作,至少我似乎不需要 ruby​​gems。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文