在heroku 上设置 prawn、prawnto

发布于 2024-09-02 13:53:40 字数 141 浏览 6 评论 0原文

我正在尝试使用 prawn、prawnto 在 Heroku 上托管的 Rails 应用程序中生成 pdf。

但我在设置方面遇到了困难。

可以在heroku上使用prawn、prawnto吗?

有指南解释我应该做什么吗?

I'm trying to use prawn, prawnto for generating pdfs in a rails application hosted on heroku.

But I'm struggling on the setup.

Is it possible to use prawn, prawnto on heroku?

Is there a guide explaining what I should do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁与争疯 2024-09-09 13:53:40

现在我找到了解决方案。

首先,我在根目录中创建了一个 .gems 文件,

prawn
prawn-layout

以便 heroku 自行安装 gems。

prawnto 是一个插件,可以安装

script/plugin install git://github.com/thorny-sun/prawnto.git

在vendor/plugin 目录中。

现在,它工作正常。
我的错误是,我认为 .gems 文件只是用于从预安装的 gem 中进行选择。

Now I've found a solution.

first of all I created a .gems file in the root directory with

prawn
prawn-layout

so heroku installs the gems by itself.

prawnto is a plugin and could be installed with

script/plugin install git://github.com/thorny-sun/prawnto.git

in the vendor/plugin directory.

Now, its working fine.
My fault was, that I thought the .gems file is just for choosing from the preinstalled gems.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文