鞋和宝石,以及如何让他们工作 [英] Shoes and Gems and how to get them working

查看:128
本文介绍了鞋和宝石,以及如何让他们工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在互联网上看到过这个问题,并以许多不同的方式回答。他们似乎没有为我工作。

我想让宝石在Shoes(特别是Gem Mechanize)中工作。

当我使用代码时:

  Shoes.setup do 
gem'mechanize'
end

需要'mechanize'

它给了我一个弹出窗口,说它正在安装原生扩展,并且在屏幕上坐了30分钟,更长的时间(我只等了30分钟)。



我见过有人说你应该把.gem文件放在〜/ .shoes / + gem / gem(在OS X上),但这并不适合我。



在另一个奇怪的音符中,宝石RedCloth和Nokogiri都带有Shoes ......但使用上面的代码给他们让我没有这样的文件为它们加载错误。



任何人都有这方面的专业知识,可以帮助我出去?

解决方案

原生扩展的Gem将无法工作。这就是说,机械化应该。但是,有时在OSX上,gem安装对话框会挂起,我还没有完全弄明白为什么。这可能是你正在经历的。 :/ b /

其次,鞋子没有配备Nokogiri,它带有h​​pricot。不过,我们计划在未来的版本中转向nokogiri。它也不包含RedCloth。


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?

解决方案

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.

这篇关于鞋和宝石,以及如何让他们工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆