gpt4 book ai didi

ruby-on-rails - 错误 : undefined method `=~' when installing ImageMagick through Homebrew

转载 作者:太空宇宙 更新时间:2023-11-03 18:27:36 25 4
gpt4 key购买 nike

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

它给了我这个:

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>'

它绝对没有告诉我任何信息,我也不知道下一步会是什么。你有什么想法吗?

我在 Mac OSX 10.6 和 Ruby 1.9.2 上运行

最佳答案

此时(2012 年 1 月)我很好奇似乎不适用于 1.9.2 的主要 gem
对于 imagemagick,我在以下位置找到了一个有效的 1.9.2 版本:
http://yakobubaidullah.blogspot.com/2011/01/installing-papperclip-rmagick2.html

注[1]:从这样的经历中,我学会了仔细挑选我的 gem,对 gem 的“受欢迎程度”进行评级,这是一个很好的想法,可以很好地了解主流的程度(以及因此升级到 ruby​​ 和 rails 的可能性有多大)版本)。
对于 github gems,我查看:最近更新的时间(例如 github 主页)。有多少个 fork ?有多少下载量?

对于 ruby​​gems,我查看下载次数和随时间变化的统计数据图表

注[2]:github 是 gems 的旧源{并且仍然是旧 gems 的源},rubygems 是"new"的地方——但这也意味着(相对)新的 gems。我相信这发生在 2010/2011 年的某个时候。

来自网站 ruby​​gems.org:“该项目于 2009 年 4 月由 Nick Quaranto 启动,此后发展到包括超过 55 名 Ruby 爱好者的贡献和数百万的 gem 下载。截至 RubyGems 1.3.6发布后,该站点已从 Gemcutter 重命名为 RubyGems.org,以巩固该站点在 Ruby 社区中的中心地位。
对该站点技术方面的一些见解:它是 100% Ruby。主站点是一个 Rails 应用程序,RubyGem 服务是通过 Sinatra 完成的。 Gem 托管在 Amazon S3 上,发布新 Gem 和准备好安装之间的时间很短。有关详细信息,请查看 GitHub 上获得 MIT 许可的代码。”

这些链接也可能有帮助:

Can't install Imagemagick on Mac with Brew

Cannot install older version of ImageMagick via Homebrew

Installation of imagemagick with BREW

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

关于ruby-on-rails - 错误 : undefined method `=~' when installing ImageMagick through Homebrew,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8872447/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com