Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 210037

Summary: dev-ruby/actionmailer - require 'action_mailer' fails
Product: Gentoo Linux Reporter: Harris Landgarten <harrisl>
Component: [OLD] DevelopmentAssignee: Gentoo Ruby Team <ruby>
Status: RESOLVED CANTFIX    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Harris Landgarten 2008-02-13 19:00:17 UTC
require 'action_mailer' fails with the following:

/usr/lib/ruby/site_ruby/1.8/rubygems.rb:319:in `activate': can't activate activesupport (= 1.4.4), already activated activesupport-2.0.2] (Gem::Exception)
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller.rb:30
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
	from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer.rb:27
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
	from ./zimbra_status.rb:4


Reproducible: Always

Steps to Reproduce:
1.irb
2.require 'rubygems'
3.require 'action_mailer'

Actual Results:  
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:319:in `activate': can't activate activesupport (= 1.4.4), already activated activesupport-2.0.2] (Gem::Exception)
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller.rb:30
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
	from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer.rb:27
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
	from ./zimbra_status.rb:4


Expected Results:  
true

This happened after the 2.02 upgrades.
Comment 1 Harris Landgarten 2008-02-16 20:41:31 UTC
I found the problem:

In /usr/lib/ruby/gems/1.8/gems some 2.0.2 gems have a "-" appended and some don't.

activesupport is activesupport-2.0.2- as is activerecord.

However actionpack is actionpack-2.0.2 and actionmailer is as well.

I mv actionpack-2.0.2 to actionpack-2.0.2- and did the same to actionmailer.

This solved the problem. I could not find documentation as to the meaning of the appended dash but I could see by tracing that action_controller was trying to load activesupport-1.4.4 after failing unless defined?(ActiveSupport)

Appending the - solved the problem and action_mailer now works. Does anyone know the meaining of the appended dashes and why they were on some folders and not others?

Comment 2 Hans de Graaff gentoo-dev Security 2008-12-15 21:30:05 UTC
The problem with the dashes was introduced in a particular version of rubygems that was very shortlived and seemed to affect the rails-related gems in particular. I'm closing this bug since this has already been fixed in newer rubygems versions. I'd use OBSOLETE but we only have CANTFIX.

If you still run into this problem simply update your version of rubygems and re-install the affected gems.