#100 ✓resolved
toulmean

Somehow RedCloth interferes with Rails 2.1.0

Reported by toulmean | January 24th, 2009 @ 02:23 AM

I installed RedCloth 4.1.1 and tried running Rails on a project completely unrelated that doesn't use RedCloth.

I get this stacktrace:

script/server => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails 2.1.0 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Starting Mongrel listening at 0.0.0.0:3000 Starting Rails with development environment... Exiting /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:278:in load_missing_constant': uninitialized constant RedCloth::HTML (NameError)

from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:467:in `const_missing'
from /Library/Ruby/Site/1.8/formatters/html.rb:1
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
from /Library/Ruby/Site/1.8/redcloth.rb:5
 ... 70 levels...
from /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
from script/server:3

Comments and changes to this ticket

  • toulmean

    toulmean January 24th, 2009 @ 02:24 AM

    Note that I run on Mac OS Leopard.

  • Jason Garber

    Jason Garber January 29th, 2009 @ 10:53 AM

    • State changed from “new” to “open”

    I'm running OS 10.5.5, Rails 2.1.0 and RedCloth 4.1.1 as well and I don't have any problem. Can you provide steps to replicate the problem?

    
    ~/Desktop $ rails -v
    Rails 2.1.0
    ~/Desktop $ redcloth -v
    RedCloth 4.1.1
    ~/Desktop $ rails test_app
          create  
          create  app/controllers
          create  app/helpers
          create  app/models
          create  app/views/layouts
          create  config/environments
          create  config/initializers
          create  db
          create  doc
          create  lib
          create  lib/tasks
          create  log
          create  public/images
          create  public/javascripts
          create  public/stylesheets
          create  script/performance
          create  script/process
          create  test/fixtures
          create  test/functional
          create  test/integration
          create  test/unit
          create  vendor
          create  vendor/plugins
          create  tmp/sessions
          create  tmp/sockets
          create  tmp/cache
          create  tmp/pids
          create  Rakefile
          create  README
          create  app/controllers/application.rb
          create  app/helpers/application_helper.rb
          create  test/test_helper.rb
          create  config/database.yml
          create  config/routes.rb
          create  config/initializers/inflections.rb
          create  config/initializers/mime_types.rb
          create  config/initializers/new_rails_defaults.rb
          create  config/boot.rb
          create  config/environment.rb
          create  config/environments/production.rb
          create  config/environments/development.rb
          create  config/environments/test.rb
          create  script/about
          create  script/console
          create  script/dbconsole
          create  script/destroy
          create  script/generate
          create  script/performance/benchmarker
          create  script/performance/profiler
          create  script/performance/request
          create  script/process/reaper
          create  script/process/spawner
          create  script/process/inspector
          create  script/runner
          create  script/server
          create  script/plugin
          create  public/dispatch.rb
          create  public/dispatch.cgi
          create  public/dispatch.fcgi
          create  public/404.html
          create  public/422.html
          create  public/500.html
          create  public/index.html
          create  public/favicon.ico
          create  public/robots.txt
          create  public/images/rails.png
          create  public/javascripts/prototype.js
          create  public/javascripts/effects.js
          create  public/javascripts/dragdrop.js
          create  public/javascripts/controls.js
          create  public/javascripts/application.js
          create  doc/README_FOR_APP
          create  log/server.log
          create  log/production.log
          create  log/development.log
          create  log/test.log
    ~/Desktop $ cd test_app/
    ~/Desktop/test_app $ ./script/server 
    => Booting Mongrel (use 'script/server webrick' to force WEBrick)
    => Rails 2.1.0 application starting on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    ** Starting Mongrel listening at 0.0.0.0:3000
    ** Starting Rails with development environment...
    ** Rails loaded.
    ** Loading any Rails specific GemPlugins
    ** Signals ready.  TERM => stop.  USR2 => restart.  INT => stop (no restart).
    ** Rails signals registered.  HUP => reload (without restart).  It might not work well.
    ** Mongrel 1.1.5 available at 0.0.0.0:3000
    ** Use CTRL-C to stop.
    

    No error.

  • toulmean

    toulmean January 29th, 2009 @ 11:04 AM

    Maybe listing my gems will help:

    16:57:21~/perso/foodie(master)>sudo gem list

    LOCAL GEMS

    abstract (1.0.0) actionmailer (2.1.0, 1.3.6) actionpack (2.1.0, 1.13.6) actionwebservice (1.2.6) activerecord (2.1.0, 1.15.6) activeresource (2.1.0) activesupport (2.1.0, 1.4.4) acts_as_ferret (0.4.1) Antwrap (0.7.0) archive-tar-minitar (0.5.2) arrayfields (4.6.0) braid (0.5) builder (2.1.2) buildr (1.3.4) buildr4eclipse (0.0.1) camping (1.5) capistrano (2.5.3, 2.4.3, 2.0.0) capistrano-ext (1.2.1) cgi_multipart_eof_fix (2.5.0, 2.2) columnize (0.1) cucumber (0.1.12) daemons (1.0.10, 1.0.9) diff-lcs (1.1.2) dnssd (0.6.0) echoe (3.0.2) english (0.2.0) erubis (2.6.2) extlib (0.9.5) facets (2.4.3) fastthread (1.0.1, 1.0) fattr (1.0.3) fcgi (0.8.7) ferret (0.11.4) gem_plugin (0.2.3, 0.2.2) haml (2.0.2) highline (1.4.0, 1.2.9) hoe (1.8.2) hpricot (0.6.161, 0.6) jdtc (0.0.1) json_pure (1.1.3) libxml-ruby (0.8.3, 0.3.8.4) linecache (0.43) mailfactory (1.4.0) main (2.8.3) manifest (0.0.2) markaby (0.5) maruku (0.5.9) memcache-client (1.5.0) merb (0.9.5) merb-action-args (0.9.5) merb-assets (0.9.5) merb-builder (0.9.5) merb-cache (0.9.5) merb-core (0.9.5) merb-freezer (0.9.5) merb-gen (0.9.5) merb-haml (0.9.5) merb-jquery (0.9.5) merb-mailer (0.9.5) merb-more (0.9.5) merb-parts (0.9.5) merb-slices (0.9.5) merb_activerecord (0.9.5) merb_helpers (0.9.5) metaid (1.0) mime-types (1.15) mislav-will_paginate (2.3.2) mongrel (1.1.5, 1.1.4) mysql (2.7) needle (1.3.0) net-scp (1.0.1) net-sftp (2.0.1, 1.1.0) net-ssh (2.0.8, 2.0.4, 2.0.3, 1.1.2) net-ssh-gateway (1.0.0) newgem (1.2.1, 0.23.1) open4 (0.9.6) ParseTree (2.2.0) piston (1.4.0) polyglot (0.2.3) pomWritr (0.1.2, 0.1.1, 0.1.0, 0.0.2, 0.0.1) rack (0.4.0) rails (2.1.0, 1.2.6) rake (0.8.3) RedCloth (4.1.1) rjb (1.1.6, 1.1.2) rspec (1.1.11, 1.1.5, 1.1.4) rubigen (1.4.0, 1.3.2) ruby-debug (0.10.3, 0.10.1) ruby-debug-base (0.10.3, 0.10.1) ruby-openid (1.1.4) ruby-yadis (0.3.4) ruby2ruby (1.1.9) rubyforge (1.0.1, 1.0.0) rubygems-update (1.3.1, 1.2.0) RubyInline (3.7.0) rubyist-aasm (2.0.2) rubynode (0.1.3) rubyzip (0.9.1) sqlite3-ruby (1.2.1) syntax (1.0.0) templater (0.1.6) term-ansicolor (1.0.3) termios (0.9.4) treetop (1.2.4) will_paginate (2.2.2) xml-simple (1.0.11) ZenTest (3.10.0)

    $>rails --version Rails 2.1.0

    I don't do anything in particular.

    I just reproduced following your steps: $>rails test $>cd test $>script/server => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails 2.1.0 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Starting Mongrel listening at 0.0.0.0:3000 Starting Rails with development environment... Exiting /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:278:in load_missing_constant': uninitialized constant RedCloth::HTML (NameError)

    from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:467:in `const_missing'
    from /Library/Ruby/Site/1.8/formatters/html.rb:1
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in'
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
    from /Library/Ruby/Site/1.8/redcloth.rb:5
     ... 70 levels...
    from /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
    from script/server:3
    
    

    Sorry, not sure what I can do to help more with the issue.

  • Jason Garber

    Jason Garber January 29th, 2009 @ 03:09 PM

    That's a long list! Specifically, which ones does your app use?

  • toulmean

    toulmean January 29th, 2009 @ 03:11 PM

    Well, none, since I just created a blank rails app, and ran script/server with the same result.

    So not sure what's going on.

  • Jason Garber

    Jason Garber February 11th, 2009 @ 02:54 PM

    • Tag set to gem

    Oh, right. Good point.

    A couple things I'm noticing in your backtrace,

    
    from /Library/Ruby/Site/1.8/formatters/html.rb:1
    ...
    from /Library/Ruby/Site/1.8/redcloth.rb:5
    

    I don't have those files in my /Library/Ruby/Site/1.8/

    
    ~ $ gem list RedCloth -d
    
    *** LOCAL GEMS ***
    
    RedCloth (4.1.1, 3.0.4)
        Author: Jason Garber
        Rubyforge: http://rubyforge.org/projects/redcloth
        Homepage: http://redcloth.org
        Installed at (4.1.1): /Library/Ruby/Gems/1.8
                     (3.0.4): /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
    
        RedCloth-4.1.1 - Textile parser for Ruby. http://redcloth.org/
    ~ $ ls /Library/Ruby/Site/1.8/
    ldap			rubygems.rb		universal-darwin9.0
    rbconfig		svn
    rubygems		ubygems.rb
    

    Try those two commands and let's see what you have.

  • toulmean

    toulmean February 11th, 2009 @ 04:05 PM

    
    $>gem list RedCloth -d
    
    *** LOCAL GEMS ***
    
    RedCloth (4.1.1)
        Author: Jason Garber
        Rubyforge: http://rubyforge.org/projects/redcloth
        Homepage: http://redcloth.org
        Installed at: /Library/Ruby/Gems/1.8
    
        RedCloth-4.1.1 - Textile parser for Ruby. http://redcloth.org/
    $>ls /Library/Ruby/Site/1.8/
    formatters          rbconfig            redcloth.rb         rubygems            rubygems.rb         searchable.rb       svn                 ubygems.rb          universal-darwin9.0 xhtmldiff.rb
    
    

    OK, we're getting somewhere... should I remove the wreckage in there ?

  • Jason Garber

    Jason Garber February 13th, 2009 @ 03:25 AM

    It's worth a try. Be sure to make a backup first.

  • toulmean

    toulmean February 13th, 2009 @ 04:12 AM

    I removed formatters and RedCloth.rb. I don't understand how they got there. Thanks for your help and your amazing contribution, it is very appreciated!

    Antoine

  • Jason Garber

    Jason Garber February 13th, 2009 @ 04:28 PM

    • State changed from “open” to “resolved”

    Glad to help!

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

People watching this ticket

Tags

Pages