PDF prawnto不使用rails 3.2.8

时间:2012-08-12 21:34:09

标签: ruby-on-rails-3 pdf-generation prawn prawnto

我们正在使用prawn在我们的rails 3 app中生成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服务器也无法启动。有没有办法解决这个问题?感谢。

1 个答案:

答案 0 :(得分:2)

Prawn是一种红宝石,并不依赖于prawnto来使用rails。这是aniket的post直接在rails 3.2中使用prawn。我们按照说明操作,它也适用于rails 3.2.8。如果您与prawnto有相同的兼容问题,请查看它。