#207 ✓resolved

undefined method `textilize' for....

Reported by James | February 7th, 2011 @ 09:33 PM

Upgrading to 4.2.4 and 4.2.5 is causing undefined method textilize' for #<#<Class:0x00000005816e88>:0x00000005814d40> in the app. That's the only method that we're using in the app, so it's possible other things are affected.

4.2.3 works fine.

Using Rails 3.0.3, Bundler 1.0.10, Ruby 1.9.2p136

Comments and changes to this ticket

  • Jason Garber

    Jason Garber February 7th, 2011 @ 10:53 PM

    • State changed from “new” to “open”

    I tried to replicate it, but it worked fine for me. I'm going to need some more information...

    rvm use ruby-1.9.2-p136
    gem install bundler -v 1.0.10
    gem install rails -v 3.0.3
    rails new redcloth-test -d=sqlite3
    cd redcloth-test/
    echo "gem 'RedCloth', '4.2.5'" >> Gemfile
    bundle install
    rails g scaffold foo
    rake db:migrate
    rails server
    # Add to app/views/foos/index.html.erb: <%= raw textilize("Test *this* out!") %>
    # Hit http://localhost:3000/foos/
  • javierm

    javierm February 8th, 2011 @ 05:27 PM

    Using RedCloth 4.2.5 and either Ruby 1.8.7 or 1.9.2 I get the same error.

    I've also noticed that opening a console I get the following behavior:

    ruby-1.9.2-p136 :001 > RedCloth                                                        
    NameError: uninitialized constant RedCloth

    Both 4.2.4 and 4.2.5 behave the same way.

    I've just upgraded to Rails 3.0.4, and the problem is still there.

    I attach my Gemfile.lock, in case it helps.

  • javierm

    javierm February 8th, 2011 @ 05:38 PM

    I've tried to build a new application from scratch, exactly as you do in the example, and I get the same error in both rubies.

  • Jason Garber

    Jason Garber February 9th, 2011 @ 10:12 AM

    In the middle of the night, I awoke with "case-sensitive require" on my
    mind. Sure enough, RedCloth.rb wasn't included in the new gemspec's list of
    libs, so redcloth.rb wouldn't get required on a case-sensitive filesystem.

    Give RedCloth 4.2.6 a try and let me know how it goes.

    Sorry for the trouble,

  • javierm

    javierm February 9th, 2011 @ 11:55 AM

    Still the same here using RedCloth 4.2.6.

    I've cloned the redcloth repo and run the specs on my machine to check if that could give a hint, but all the 5795 examples pass.

  • Dougal

    Dougal February 9th, 2011 @ 04:03 PM

    Seeing the same with 4.2.4, 4.2.5 and 4.2.6.

    Using REE 1.8.7, Rails 3.0.4.

  • Jason Garber

    Jason Garber February 9th, 2011 @ 04:49 PM

    What platform? Ubuntu? OS X?

  • javierm

    javierm February 9th, 2011 @ 06:16 PM

    I'm running Ubuntu 10.10.

  • javierm

    javierm February 9th, 2011 @ 08:05 PM

    I've been debugging my application, and noticed that it never enters the main file "redcloth.rb".

    I've seen the .gemspec file says now:

    s.require_path = ["lib", "lib/case_sensitive_require"]

    I've looked into the specification file generated, and I've found that line generates:

    s.require_paths = [["lib", "lib/case_sensitive_require"]]

    Sorry if it sounds stupid, but, can you use "require_path" instead of "require_paths" when there are many paths to include? I've tried to find out in the documentation but I haven't been able to.

    If I change that line (in the generated specification file) to:

    s.require_paths = ["lib"]

    Then the same thing happens. However, if I change it to either one of these:

    s.require_paths = ["lib/case_sensitive_require"]
    s.require_paths = ["lib", "lib/case_sensitive_require"]

    Then the application actually enters the main lib/redcloth.rb file. It still fails, though, with the messsage:

    gems/RedCloth-4.2.6/lib/case_sensitive_require/../redcloth.rb:12:in `require': no such file to load -- redcloth_scan (LoadError)
    Couldn't load redcloth_scan

    I hope this message helps a bit and doesn't add unnecessary noise to this thread.

  • Cyrille

    Cyrille February 10th, 2011 @ 08:11 AM


    I've the same issue.
    4.2.3 is working fine

    4.2.5 and 4.2.6 working fine on Snow Leopard (dev env) but not on Ubuntu 10.04 (production env)

    hope this helps

  • Jason Garber

    Jason Garber February 10th, 2011 @ 11:34 AM

    Very helpful. Thank you javierm and Cyrille. It's definitely a
    case-sensitive require problem and maybe I just fixed it wrong. I'll fire up
    Ubuntu and get it sorted out over the next few days. Sorry for the trouble.

  • Jason Garber

    Jason Garber February 11th, 2011 @ 11:32 AM

    • State changed from “open” to “resolved”

    Okay, I pushed 4.2.7 and tested it myself on Ubuntu 10.10 before pushing. Hopefully I got it right this time! Thanks for all your help and feedback.

  • javierm

    javierm February 11th, 2011 @ 12:03 PM

    It's working fine here now. Thanks!

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