使用PDF Kit时发生错误 [英] Error while using PDF Kit

查看:59
本文介绍了使用PDF Kit时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过rails 3使用PDFKit,我遵循了railscast教程,发现出现以下错误:

I am trying to use PDFKit using rails 3, I followed the railscast tutorial and found that I get the following error:

:ActionController :: Base:Class的未定义方法"wrap_parameters"(NoMethodError)

: undefined method `wrap_parameters' for ActionController::Base:Class (NoMethodError)

http://railscasts.com/episodes/220-pdfkit

推荐答案

也许您不小心在Rails 3.1应用程序上加载了Rails 3.0.x?

Maybe you're accidentally loading Rails 3.0.x on a Rails 3.1 application?

如果您生成一个添加了config/initializers/wrap_parameters.rb的Rails 3.1应用程序,然后尝试使用Rails 3.0.x引导它,它将无法正常工作.

It won't work if you generate a Rails 3.1 application, which adds config/initializers/wrap_parameters.rb, and then try to boot it with Rails 3.0.x.

如果要使用Rails 3.1: 您是否正在使用捆绑软件运行,例如bundle exec unicorn_railsbundle exec rake?

If you want Rails 3.1: Are you running with bundler, e.g. bundle exec unicorn_rails or bundle exec rake?

如果要使用Rails 3.0.x: 通过运行rails new appname以查看需要更改的内容来重新生成应用程序.

If you want Rails 3.0.x: Regenerate the application by running rails new appname to see what needs to change.

这篇关于使用PDF Kit时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆