0

imagemagic 和 wkhtml 在 users/mithin 中可用

我尝试在配置文件中设置路径。这是 .profile 的内容:

export PATH="/usr/bin:/usr/local/bin:$PATH"
export PATH="/usr/local/mysql/bin:$PATH"
export PATH="/Users/mithin/:$PATH"
export PATH="/Users/mithin/ImageMagick-6.6.7/bin:$PATH"

当我尝试在终端中运行“识别”时,它运行正常

当我尝试运行我的 Ruby on rails 项目时,它会出错。

“wkhtmltopdf”也会发生类似的事情

在终端它运行正常

但在 ror 输出中它给出:

sh:wkhtmltopdf:找不到命令

谁能指出我的错误?

4

1 回答 1

0

要让 Paperclip 在默认安装位置之外找到命令,请将以下内容添加到 /config/environments/ 中的相应文件中

Paperclip.options[:command_path] = "/Users/mithin/ImageMagick-6.6.7/bin"
于 2011-05-05T16:28:32.680 回答