#42 ✓resolved
Per Velschow

uninitialized constant RedCloth::TextileDoc

Reported by Per Velschow | August 18th, 2008 @ 05:15 AM | in 4.0.3

When using RedCloth 4.0.2 on both Rails 2.1.0 and Edge, I get the following error: http://pastie.org/254816

When using RedCloth 4.0.1 or earlier, everything runs fine.

Comments and changes to this ticket

  • Per Velschow

    Per Velschow August 18th, 2008 @ 05:53 AM

    Forgot to mention that this is on Mac OS X 10.5.4 with the default, case-insensitive filesystem. Just in case it matters. :)

  • Jason Garber

    Jason Garber August 18th, 2008 @ 09:07 AM

    The problem is the line I put in to work around bug #30. That scenario is that you have the RedCloth 3.0.4 gem installed but the 4.0.1 gem was frozen in your Rails app. Rails 2.1 would load 3.0.4 for the textilize helper and then try to load 4.0.1 on top of it. Crash.

    So, in RedCloth 4.0.2, I had it remove any preexisting RedCloth constant before loading the 4.0.2 gem. Well, when you had 4.0.2 installed as a gem, Rails would load it when loading the helpers, then would remove it, but reloading didn't work so well.

  • mrflip

    mrflip August 18th, 2008 @ 09:08 AM


    I'm getting the same error on 4.0.2; 4.0.1 also worksforme, also on OSX 10.5 rails 2.1.0.

    The pertinent line in my environment.rb:

    @ config.gem "RedCloth", :version => "= 4.0.1", :lib => 'redcloth' @

  • Jason Garber

    Jason Garber August 18th, 2008 @ 09:17 AM

    • State changed from “new” to “resolved”

    (from [064deb04b520fd08fdbd85af7e332b2c0108fa62]) Fix uninitialized constant RedCloth::TextileDoc

    The problem was the workaround introduced to deal with bug #30 would remove not only the old RedCloth when it was loaded by Rails' textilize helper because the current RedCloth was frozen and not installed, but also the current version when it was installed. Rather sloppy on my part. [#42 state:resolved] http://github.com/jgarber/redclo...

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

RedCloth is a Ruby library for converting Textile into HTML

Shared Ticket Bins


Referenced by