4
我在编程的第12小时,所以我可能会忽略简单的东西,但在这个问题上的任何建议?rails:NoMethodError仅在生产
我app_helper我加了一个模块一个隆重的接待滤波器HAML
module Haml::Filters::Redcarpet
include Haml::Filters::Base
include ActionView::Helpers::TagHelper
def render(text)
options = [:autolink, :smart, :hard_wrap, :no_intraemphasis]
content_tag(:div, Redcarpet.new(text.to_s, *options).to_html.html_safe, :class => "markup")
end
end
发展的伟大工程。但在生产中,这是投掷
[ !EXCEPTION! ] NoMethodError: undefined method 'content_tag' for Haml::Filters::Redcarpet:Module
为什么会这样?或我可以检查什么?我甚至在生产中运行了控制台,并且能够包含TagHelper并使用这些方法。困惑...
请发布您的/config/environments/production.rb和development.rb文件 - 这两个环境之间可能存在差异,导致该问题。 – jefflunt
我搭上了2个配置的贴子。 http://pastie.org/2142973 – brewster
另外,开发环境是OSX/WEBrick,生产是Debian/Passenger – brewster