我在本地应用程序中使用RedCloth时遇到问题.我一直收到以下错误: uninitialized constant ActionView::CompiledTemplates::RedCloth 发生这种情况是因为我有以下代码: %= RedCloth.new("Some text").to_html % 我
uninitialized constant ActionView::CompiledTemplates::RedCloth
发生这种情况是因为我有以下代码:
<%= RedCloth.new("Some text").to_html %>
我试图做的是把它放在environment.rb文件中:
require "RedCloth"
但是,当我这样做时,我的Phusion Passenger Nginx配置出现了一个巨大的错误,我在下面的论坛中详细介绍过:http://railsforum.com/viewtopic.php?id=42560
任何帮助都会很棒.谢谢!
确保你的Gemfile中有一个gem’RedCloth’.无论您的系统中实际安装了哪些宝石,Rails都只会使用Gemfile中列出的宝石.您也不需要require“RedCloth”语句.