如何让 Shoes 使用已经安装的 gem?
我创建并安装了一个 ruby gem,并且希望能够在 Shoes 应用程序中使用它。正如预期的那样,Shoes 报告它找不到 gem,这是可以理解的,因为 gem 仅为标准 ruby 发行版安装。如果能帮助指向解释如何让鞋子找到这个宝石的文档将不胜感激。
谢谢。
I have a ruby gem I created and installed and want to be able to use it in a Shoes app. As expected, Shoes reports it cannot find the gem, understandably since the gem is only installed for the standard ruby distribution. Can help pointing towards documentation explaining how to get Shoes to find this gem would be most appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除非自从 _why 离开后情况发生了变化,否则这是不可能的。 Shoes 是一个单独的 Ruby 安装,因此需要它自己的 gem。
要安装 gem,您可以在 Shoes 应用程序的开头执行类似的操作:
编辑:还有之前的 SO 线程:
通过 Shoes 应用程序使用 Ruby 库和 gem
Unless things have changed since _why left, this is not possible. Shoes is a separate Ruby installation and therefore needs its own gems.
To install a gem, you can do something like this at the beginning of your Shoes app:
Edit: there's also this previous SO thread:
Using Ruby libraries and gems with a Shoes app
你可以将 Shoes 视为 ruby 发行版,就像 jruby 或其他 ruby 一样,它维护自己的 gem。
因此你需要像迈克尔·科尔所说的那样通过鞋子安装它
U can think Shoes as a ruby-distro, like jruby or other rubies, it maintains its own gems.
therefore you will need to install it via shoes way like Michael Kohl said