2012-08-12 80 views
1

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

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服务器无法启动。有没有办法解决这个问题?谢谢。

+0

看来,ActionView :: TemplateHandler在rails 3.2中被删除。它似乎并没有在一段时间内更新prawnt,您可能需要将其修改并修改为使用w/rails 3.2。 – Brian 2012-08-12 21:51:05

+0

如果是这种情况,我们可能会选择使用另一个gem for pdf。谢谢。 – user938363 2012-08-12 23:31:13

+0

有没有一种方法,我们可以使用虾没有在rails 3.2.8中的prawnto? – user938363 2012-08-13 00:08:19

回答

2

虾是红宝石宝石,并不依赖于prawnto与铁轨工作。这里是aniket的post,用于直接在rails 3.2中使用虾。我们遵循这个指令,它也在rails 3.2.8中工作。如果你有与prawnto相同的兼容性问题,请检查它。