【发布时间】:2021-01-13 22:23:11
【问题描述】:
我已经尝试了几个小时来解决这个问题,我到处寻找解决方案,但没有找到。我正在尝试为我的项目运行规范测试,但出现以下错误:
RuntimeError:
Ghostscript not found in your system environment (linux-gnu).
Install it and set the variable RGhost::Config::GS[:path] with the executable.
Example: RGhost::Config::GS[:path]='/path/to/my/gs' #unix-style
RGhost::Config::GS[:path]="C:\\gs\\bin\\gswin32c.exe" #windows-style
我确实尝试输入 RGhost::Config::GS[:path]='/usr/local/bin/gs' 并返回:
bash: RGhost::Config::GS[:path]=/usr/local/bin/gs: No such file or directory
但 ghostscript 已安装,我做了所有事情(make、sudo make install 等),当我运行 gs -v 时它返回:
GPL Ghostscript 9.26 (2018-11-20)
Copyright (C) 2018 Artifex Software, Inc. All rights reserved.
当我使用用户界面并在“文件”应用程序中搜索“gs”时,在/home/marcelle/projects/ghostscript-9.26/bin/gs 中找到了它,我也尝试了:
RGhost::Config::GS[:path]='/home/marcelle/projects/ghostscript-9.26/bin/gs'
它返回相同的错误:
bash: RGhost::Config::GS[:path]=/home/marcelle/projects/ghostscript-9.26/bin/gs: No such file or directory
我还尝试使用 autoremove 和 purge 从我的笔记本中删除 ghostscript,然后使用我之前提到的(./configure、make、sudo make install)重新安装它,重新启动笔记本、终端,什么都没有。
PS:我使用的是 Ubuntu 20.04。
【问题讨论】:
-
这看起来像一个红宝石问题。 rubydoc.info/gems/rghost/0.9.7/RGhost/Config
标签: ruby-on-rails ruby ruby-on-rails-5 runtime-error ghostscript