ruby-on-rails-3pdf-generationprawnprawnto

PDF prawnto are not working with rails 3.2.8


we are using prawn to generate pdf file in our rails 3 app. Now after upgrading to rails 3.2.8, there is a problem with rails plugin prawnto. Here is the errror:

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)

Even rails server can not be started. Is there a way to fix this problem? thanks.


Solution

  • Prawn is a ruby gem and is not depending on prawnto to work with rails. Here is a post by aniket to use prawn directly in rails 3.2. We followed the instruction and it works in rails 3.2.8 as well. Check it out if you have the same compatible issue with prawnto.