2012-08-12 79 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相同的兼容性問題,請檢查它。