Friday, April 04, 2008

New Ruport 1.6.0 Ruport::Renderer Causing Trouble when Using Documatic 0.1.0

When I updated my Ruport gem to 1.6.0, Rails can not be started. Here's the errors:


[bpdp@bpdp-archlinux bowencms]$ script/server start
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 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
Exiting
/home/bpdp/software/xrails-new/ruby/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitialized constant Ruport::Renderer (NameError)
from /home/bpdp/software/xrails-new/ruby/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
from /home/bpdp/software/xrails-new/ruby/gems/gems/documatic-0.1.0/lib/documatic/formatter/open_document.rb:12
from /home/bpdp/software/xrails-new/ruby//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /home/bpdp/software/xrails-new/ruby//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /home/bpdp/software/xrails-new/ruby/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from /home/bpdp/software/xrails-new/ruby/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /home/bpdp/software/xrails-new/ruby/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from /home/bpdp/software/xrails-new/ruby/gems/gems/documatic-0.1.0/lib/documatic/init.rb:3
... 30 levels...
from /home/bpdp/software/xrails-new/ruby/gems/gems/rails-2.0.2/lib/commands/server.rb:39
from /home/bpdp/software/xrails-new/ruby//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /home/bpdp/software/xrails-new/ruby//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from script/server:3
[bpdp@bpdp-archlinux bowencms]$

The key to this error was this:
    uninitialized constant Ruport::Renderer

Curiously, I started to look at Ruport API 1.6.0 and found that there were no Renderer class anymore. It's been changed to Formatter. While Documatic 0.1.0 gem still use Renderer, this will cause server can not be started.

So, if you experienced this problem, remove Documatic 0.1.0 gem and reinstall it again when it's already changed properly.

2 comment(s):

Gregory Brown said...

Ruport::Renderer was changed to Ruport::Controller, not Formatter in 1.6

I've pinged Dave, but please feel free to use the Ruport list to report Documatic problems in the future.

Though Documatic is not officially supported by the Ruport devs, we know many Ruport users are using it, so we share some resources...

bpdp said...

Yes, you are right. Thanks for the explanation.