在Rails 3.0.1中,如何解决使用RedCloth 4.2.2 gem时未初始化的Ruby on Rails常量问题?
- 内容介绍
- 文章标签
- 相关推荐
本文共计218个文字,预计阅读时间需要1分钟。
我在本地应用中使用RedCloth时遇到了问题。我直接收到以下错误:`uninitialized constant ActionView::CompiledTemplates::RedCloth`。这种情况发生是因为我使用了以下代码:`%25=RedCloth.new(Some text).to_ %25`。
我在本地应用程序中使用RedCloth时遇到问题.我一直收到以下错误:uninitialized constant ActionView::CompiledTemplates::RedCloth
发生这种情况是因为我有以下代码:
<%= RedCloth.new("Some text").to_html %>
我试图做的是把它放在environment.rb文件中:
require "RedCloth"
但是,当我这样做时,我的Phusion Passenger Nginx配置出现了一个巨大的错误,我在下面的论坛中详细介绍过:railsforum.com/viewtopic.php?id=42560
任何帮助都会很棒.谢谢!
确保你的Gemfile中有一个gem’RedCloth’.无论您的系统中实际安装了哪些宝石,Rails都只会使用Gemfile中列出的宝石.您也不需要require“RedCloth”语句.本文共计218个文字,预计阅读时间需要1分钟。
我在本地应用中使用RedCloth时遇到了问题。我直接收到以下错误:`uninitialized constant ActionView::CompiledTemplates::RedCloth`。这种情况发生是因为我使用了以下代码:`%25=RedCloth.new(Some text).to_ %25`。
我在本地应用程序中使用RedCloth时遇到问题.我一直收到以下错误:uninitialized constant ActionView::CompiledTemplates::RedCloth
发生这种情况是因为我有以下代码:
<%= RedCloth.new("Some text").to_html %>
我试图做的是把它放在environment.rb文件中:
require "RedCloth"
但是,当我这样做时,我的Phusion Passenger Nginx配置出现了一个巨大的错误,我在下面的论坛中详细介绍过:railsforum.com/viewtopic.php?id=42560
任何帮助都会很棒.谢谢!
确保你的Gemfile中有一个gem’RedCloth’.无论您的系统中实际安装了哪些宝石,Rails都只会使用Gemfile中列出的宝石.您也不需要require“RedCloth”语句.
