1

我们正在使用 prawn 在我们的 rails 3 应用程序中生成 pdf 文件。现在升级到rails 3.2.8后,rails plugin prawnto出现了问题。这是错误:

DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them o
ut and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes
 for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at D:/rails_proj/
emclab-failed2/config/environment.rb:5)
DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases,simply use Ruby memoization pattern inst
ead. (called from extend at D:/rails_proj/emclab-failed2/vendor/plugins/prawnto/lib/prawnto/template_handler/compile_support.rb:5)
D:/rails_proj/emclab-failed2/vendor/plugins/prawnto/lib/prawnto/template_handlers/base.rb:3:in `<module:TemplateHandlers>': uninitialized co
nstant ActionView::TemplateHandler (NameError)

连rails server都无法启动。有没有办法解决这个问题?谢谢。

4

1 回答 1

2

Prawn 是一颗红宝石,不依赖 prawnto 与 rails 一起工作。这是 aniket 的帖子,可直接在 rails 3.2 中使用 prawn。我们按照说明进行操作,它也适用于 rails 3.2.8。如果您与 prawnto 有相同的兼容问题,请检查它。

于 2012-08-13T14:54:19.737 回答