Ticket #77 (closed defect: invalid)

Opened 2 years ago

Last modified 2 years ago

require 'ruport/rails' ate my lunch

Reported by: dudley Assigned to:
Milestone: Keywords: transaction rails rubygems
Cc:

Description

Requiring 'ruport/rails' in environment.rb results in this error anytime the application loads:

/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.3.0/lib/transaction/simple.rb:74: warning: already initialized constant Messages
/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.3.0/lib/transaction/simple.rb:274: warning: already initialized constant TRANSACTION_SIMPLE_VERSION
/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.3.0/lib/transaction/simple.rb:635: warning: already initialized constant TRANSACTION_CHECKPOINT
/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.3.0/lib/transaction/simple.rb:636: warning: already initialized constant SKIP_TRANSACTION_VARS

This also causes several of my unit tests (which were passing before) to fail. The failing tests all depend on methods that use transactions. So, I think rubygems is screwing me by reloading the Transaction::Simple gem somewhere inside Ruport, even though Rails has already loaded its own version.

Change History

09/19/06 07:47:29 changed by dudley

  • type changed from task to defect.

09/20/06 09:57:58 changed by sandal

what version of RubyGems?? This is PDF::Writer that does this and it sounds like you might have that old version of gems that tries to load in all your libs at once.

by the way, this dep comes via PDF::Writer, if you want to investigate further

09/20/06 09:58:51 changed by sandal

  • owner deleted.

09/20/06 10:16:18 changed by dudley

  • status changed from new to closed.
  • resolution set to invalid.

I was using rubygems 0.8.11. Upgrading to 0.9 fixed it.