# Installing RedCloth

**URL:** <https://www.ruby-forum.com/t/installing-redcloth/175834>\
**Category:** Rails\
**Created:** [September 21, 2009, 5:59am UTC](https://www.ruby-forum.com/t/installing-redcloth/175834 "2009-09-21T05:59:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@Davo](https://www.ruby-forum.com/u/Davo)\
**Post date:** [September 21, 2009, 5:59am UTC](https://www.ruby-forum.com/t/installing-redcloth/175834/1 "2009-09-21T05:59:20Z")

</div>

Hi All,

I’m working through a book which touches on Textile for formating in  
the body of a blog.

The procedure is:

1. Add this line to environment.rb  
config.gem “RedCloth”, :version =\> “\>= 3.301”, :source =\> “http://  
[code.whytheluckystiff.net](http://code.whytheluckystiff.net)”

2. rake gems:install

3. use \<%= textilize(article.body) %\>

So it fails at #1 because of the whythluckystiff resources not being  
available anymore !

So does anyone have an alternative so I can get this working ?

regards, Dave P.

---

<div class="post-metadata">

**Author:** ![Davo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@Davo](https://www.ruby-forum.com/u/Davo)\
**Post date:** [September 21, 2009, 6:47am UTC](https://www.ruby-forum.com/t/installing-redcloth/175834/2 "2009-09-21T06:47:20Z")

</div>

OK, I got RedCloth installed, but line at step 3 now gives this error:  
(I replaced my original \<%= textilize(article.body) %\> with the line  
shown from the rail api, they both give the same error! )  
Regards, Dave

> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

NameError in Articles#index

Showing app/views/articles/index.html.erb where line #7 raised:

uninitialized constant ActionView::Helpers::TextHelper::RedCloth  
Extracted source (around line #7):

4:

## \<%= link\_to h(article.title), article %\>
  
5:  
6: 
  
7: \<%= textilize(“_This is Textile!_ Rejoice!”) %\>  
8:   
9: 
  
10:  
RAILS\_ROOT: C:/Ruby/RailsApps/blog

Application Trace | Framework Trace | Full Trace  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active\_support/  
dependencies.rb:440:in `load_missing_constant' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/ dependencies.rb:80:in`const\_missing’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action\_view/  
helpers/text\_helper.rb:251:in `textilize' C:/Ruby/RailsApps/blog/app/views/articles/index.html.erb:7:in`\_run\_erb\_app47views47articles47index46html46erb’  
C:/Ruby/RailsApps/blog/app/views/articles/index.html.erb:1:in `each' C:/Ruby/RailsApps/blog/app/views/articles/index.html.erb:1:in`\_run\_erb\_app47views47articles47index46html46erb’  
C:/Ruby/RailsApps/blog/app/controllers/articles\_controller.rb:7:in  
`index’  
\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<

---

<div class="post-metadata">

**Author:** ![Davo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@Davo](https://www.ruby-forum.com/u/Davo)\
**Post date:** [September 23, 2009, 9:30am UTC](https://www.ruby-forum.com/t/installing-redcloth/175834/3 "2009-09-23T09:30:27Z")

</div>

On Sep 21, 5:45 am, Dave P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> RAILS\_ROOT: C:/Ruby/RailsApps/blog  
> C:/Ruby/RailsApps/blog/app/views/articles/index.html.erb:1:in `each’
> 
> > I’m working through a book which touches on Textile for formating in  
> > 3) use \<%= textilize(article.body) %\>
> 
> > So it fails at #1 because of the whythluckystiff resources not being  
> > available anymore !
> 
> > So does anyone have an alternative so I can get this working ?
> 
> > regards, Dave P.  
> > Hi Dave,

Try this in your environment.rb

config.gem “RedCloth”, :lib =\> “redcloth”

Working perfectly as of writing with RedCloth 4.2.2 (pre-installed),  
RoR 2.3.4.
