鞋子和宝石以及如何让它们发挥作用
我在互联网上看到过这个问题,并以多种不同的方式得到了回答。他们似乎都不适合我。
我正在尝试让宝石在鞋子中发挥作用(特别是宝石机械化)。
每当我使用该代码时:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嘿,这里是鞋子维修员。
具有本机扩展的 Gems 将无法工作。也就是说,机械化应该。然而,有时,在 OSX 上,gem 安装对话框有点挂起,我还没有完全弄清楚原因。这可能就是你正在经历的。 :/
其次,鞋子不带有Nokogiri,它带有hpricot。不过,我们计划在未来的版本中迁移到 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.