Installing RedCloth

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

  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.

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:inconst_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’
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

On Sep 21, 5:45 am, Dave P. [email protected] 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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs