在Rails 3中使用Paperclip安装RMagick时出现问题 [英] Problems installing RMagick with Paperclip in Rails 3

查看:165
本文介绍了在Rails 3中使用Paperclip安装RMagick时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在rails中使用回形针,当我执行bundle install时,出现以下错误:

无法安装RMagick 2.13.1。无法在/ usr / local / mysql / bin中找到Magick-config:/ usr / local / bin:/ usr / local / sbin:/ usr / bin:/ bin:/ usr / sbin:/ sbin:/ usr / local / bin:/ usr / local / git / bin:/ usr / X11 / bin:/Users/seanhinton/.rvm/bin

我想知道的是我如何在我的机器上安装RMagick(这是我需要的?)(它是OSX 10.6)?



干杯!

解决方案

RMagick是ImageMagick的红宝石适配器。获取ImageMagick是一个巨大的痛苦,它不会默认出现在您的计算机上。以下是获取它的最简单方法:


  1. 获取自制软件(Mac OS软件包管理器)。

  2. 在终端中,运行 brew install imagemagick / li>
  3. 现在将 gem'rmagick'添加到您的Gemfile中。 (在您的应用程序根目录中)

  4. 最后,在终端中运行 bundle install

就是这样。请注意,imagemagick安装程序可能需要一段时间。


I'm trying to use paperclip in rails and when I'm doing the "bundle install" I'm getting the following error:

Can't install RMagick 2.13.1. Can't find Magick-config in /usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/seanhinton/.rvm/bin

What I'm wondering is how do I install RMagick (is that what I need?) on my machine (it's OSX 10.6)?

Cheers!

解决方案

RMagick is a ruby adapter for ImageMagick. Getting ImageMagick is a huge pain, and it doesn't come on your computer by default. Here's the easiest way to get it:

  1. Get Homebrew (Mac OS Package Manager).
  2. In terminal, run brew install imagemagick.
  3. Now add gem 'rmagick' to your Gemfile. (in your application root directory)
  4. Finally, in terminal, run bundle install.

That's it. Note that the imagemagick installer may take a while.

这篇关于在Rails 3中使用Paperclip安装RMagick时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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