鞋子和宝石以及如何让它们发挥作用

发布于 2024-10-10 04:49:42 字数 468 浏览 8 评论 0原文

我在互联网上看到过这个问题,并以多种不同的方式得到了回答。他们似乎都不适合我。
我正在尝试让宝石在鞋子中发挥作用(特别是宝石机械化)。
每当我使用该代码时:

Shoes.setup do
   gem 'mechanize'
end

require 'mechanize'

它都会弹出一个窗口,显示正在安装本机扩展,并在该屏幕上停留 30 分钟或更长时间(我只等了 30 分钟)。

我见过有人说你应该将 .gem 文件放在 ~/.shoes/+gem/gem (在 OS X 上)中,但这对我不起作用。两者都没有将 gem 的源代码放在那里。

另一个奇怪的地方是,宝石 RedCloth 和 Nokogiri 都附带了 Shoes...但是对它们使用上面的代码会给我带来 No such file to load 错误。

有人在这方面有专业知识并且可以帮助我吗?

I have seen this question asked all over the internet and answered in many different ways. None of them seem to be working for me.
I am trying to get Gems to work in Shoes (specifically the gem Mechanize).
Whenever I use the code:

Shoes.setup do
   gem 'mechanize'
end

require 'mechanize'

It gives me the popup that says it is installing native extensions and sits at that screen for 30 minutes and longer (I've only ever waited as long as 30 minutes).

I have seen people say that you should be putting the .gem files in ~/.shoes/+gem/gem (on OS X) but that hasn't worked for me. Neither has putting the source code for the gem there.

On another odd note, both the gems RedCloth and Nokogiri come with Shoes...but using the above code for them gets me No such file to load errors for both of them.

Anyone have any expertise in this area and can help me out?

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

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

发布评论

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

评论(1

花心好男孩 2024-10-17 04:49:42

嘿,这里是鞋子维修员。

具有本机扩展的 Gems 将无法工作。也就是说,机械化应该。然而,有时,在 OSX 上,gem 安装对话框有点挂起,我还没有完全弄清楚原因。这可能就是你正在经历的。 :/

其次,鞋子不带有Nokogiri,它带有h​​pricot。不过,我们计划在未来的版本中迁移到 nokogiri。它也不附带红布。

Hey, Shoes maintainer here.

Gems with native extensions won't work. That said, mechanize should. However, sometimes, on OSX, the gem install dialog kinda hangs, and I haven't totally figured out why yet. This is probably what you're experiencing. :/

Secondly, Shoes does not come with Nokogiri, it comes with hpricot. We are planning on moving to nokogiri in a future release, though. It also does not come with RedCloth.

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