Uninitialized constant in Rails 3.0.1 using Crystal RedCloth 4.2.2

I have a problem using RedCloth in my local application. I keep getting the following error:

uninitialized constant ActionView::CompiledTemplates::RedCloth

This is because I have the following code:

<%= RedCloth.new("Some text").to_html %>

I tried to do this in the environment.rb file:

require "RedCloth"

However, when I do this, I get a huge error with my Phusion Passenger + Nginx configuration, which I described in detail in the following forum: http://railsforum.com/viewtopic.php?id=42560

Any help would be great. Thank!

+3
source share
2 answers

, Gemfile gem 'RedCloth'. , , Rails , Gemfile. require "RedCloth".

+4

, Gemfile "RedCloth". require

require 'redcloth'

class StaticController < ApplicationController
...
+3

Source: https://habr.com/ru/post/1786463/


All Articles