错误:通过Homebrew安装ImageMagick时未定义的方法`=〜' [英] Error: undefined method `=~' when installing ImageMagick through Homebrew

查看:179
本文介绍了错误:通过Homebrew安装ImageMagick时未定义的方法`=〜'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过Homebrew安装ImageMagick时,我得到了一个非常奇怪的答案。

I'm getting a very weird answer when I'm trying to install ImageMagick through Homebrew.

它给了我这个:

Holger-Sindbaeks-MacBook-Air:showwwdown_0.3 holgersindbaek$ brew install imagemagick

Error: undefined method `=~' for #<Pathname:/usr/local/Library/Formula/jpeg.rb>
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
/usr/local/Library/Homebrew/formula.rb:426:in `factory'
/usr/local/Library/Homebrew/formula_installer.rb:38:in `block (2 levels) in install'
/usr/local/Library/Homebrew/extend/ARGV.rb:121:in `filter_for_dependencies'
/usr/local/Library/Homebrew/formula_installer.rb:34:in `block in install'
/usr/local/Library/Homebrew/formula_installer.rb:30:in `each'
/usr/local/Library/Homebrew/formula_installer.rb:30:in `install'
/usr/local/Library/Homebrew/cmd/install.rb:103:in `block in install_formulae'
/usr/local/Library/Homebrew/cmd/install.rb:86:in `each'
/usr/local/Library/Homebrew/cmd/install.rb:86:in `install_formulae'
/usr/local/Library/Homebrew/cmd/install.rb:24:in `install'
/usr/local/bin/brew:83:in `<main>'

它绝对没有告诉我,我不知道什么下一步可能是。你有什么想法吗?

It tells me absolutely nothing and I don't know what the next step might be. Do you have any ideas?

我在Mac OSX 10.6和Ruby 1.9.2上运行

I'm running on Mac OSX 10.6 and Ruby 1.9.2

推荐答案

我很好奇(2012年1月)关于主要的宝石似乎无法使用1.9.2

对于imagemagick我发现了一个有效的1.9.2版本详细信息:

http:// yakobubaidullah .blogspot.com / 2011/01 / installing-papperclip-rmagick2.html

I'm curious at this point (Jan 2012) about major gems that don't seem to work with 1.9.2
For imagemagick I found a working 1.9.2 version detailed at:
http://yakobubaidullah.blogspot.com/2011/01/installing-papperclip-rmagick2.html

注意[1]:从这样的经历我学会了选择我的宝石仔细评价宝石是如何'流行'作为主流(以及因此有可能升级为ruby和rails版本)的好主意。

对于github宝石,我看一下:
最近更新的最近时间(例如主要的github页面)。
多少叉?
下载多少?

Note[1]: From experiences like this I have learned to pick my gems carefully, rating how 'popular' a gem is as a pretty good idea of how mainstream (and thus how likely to be upgraded for both ruby and rails versions).
For github gems I look at: How recently it was last updated (e.g. main github page). How many forks? How many downloads?

对于rubygems,我会查看下载次数和随时间变化的统计数据

For rubygems I look at the number of downloads and the stats over time graphs

注意[2]:github是宝石的旧资源{并且仍然是旧宝石的来源},rubygems是'新'的地方 - 但这也意味着(相对)新的宝石。这发生在2010/2011年的一段时间。我相信。

Note[2]: github is the older source for gems {and still the source for older gems}, rubygems is the 'new' place - but that also means for (relatively) new gems. This happened some time in 2010 / 2011 i believe.

来自网站rubygems.org:该项目于2009年4月由Nick Quaranto启动,并且自从发展到包括超过55位Rubyists和数百万次gem下载的贡献。从RubyGems 1.3.6版本开始,该网站已经从Gemcutter重命名为RubyGems.org,以巩固该网站在Ruby社区中的核心角色。

对网站技术方面的一些见解:它是100%Ruby。主要网站是Rails应用程序,RubyGem服务是通过Sinatra完成的。宝石托管在Amazon S3上,以及发布新版本之间的时间宝石并准备安装是最小的。有关更多信息,请查看代码,这是MIT在GitHub上获得许可。

From the site rubygems.org: "The project was started in April 2009 by Nick Quaranto, and has since grown to include the contributions of over 55 Rubyists and millions of gem downloads. As of the RubyGems 1.3.6 release, the site has been renamed to RubyGems.org from Gemcutter to solidify the site's central role in the Ruby community.
Some insights into the technical aspects of the site: It's 100% Ruby. The main site is a Rails application, and the RubyGem serving is done through Sinatra. Gems are hosted on Amazon S3, and the time between publishing a new gem and having it ready for installation is minimal. For more info, please check out the code, which is MIT licensed over at GitHub."

这些链接也可以提供帮助:

These links may also help:

无法在Mac上使用Brew安装Imagemagick

无法通过Homebrew安装旧版ImageMagick

安装imagemagick BREW

注意[3]:最后,正如我在上面评论的那样,在ruby 1.9中,=〜是可重新定义的,而在1.8中则不是。

Note[3]: Finally, as I commented above, in ruby 1.9 the =~ is redefinable whereas in 1.8 it wasn't.

这篇关于错误:通过Homebrew安装ImageMagick时未定义的方法`=〜'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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