On 6/13/06, Eric Hodel <drbrain / segment7.net> wrote:

> So I don't believe rubygems is at fault here.

I decided to make a simple example gem to illustrate this.  Here is
the Rakefile with simple spec

require "rake/rdoctask"
require "rake/testtask"
require "rake/gempackagetask"
require "rubygems"

spec = Gem::Specification.new do |spec|
  spec.name = "dummie"
  spec.version = "0.0.1"
  spec.platform = Gem::Platform::RUBY
  spec.summary = "A dummy lib"
  spec.require_path = "lib"
  spec.files = "lib/dumb.rb"
  spec.add_dependency('ruport', '>= 0.1.0')
end

Rake::GemPackageTask.new(spec) do |pkg|
  pkg.need_zip = true
  pkg.need_tar = true
end

lib/dumb.rb actually is just an empty file.  There are no requires.
If you unpack the gem once installing it, you can see this.

Now take a look at this.

[sandal@harmonix ~]$ irb -rubygems --simple-prompt
>> require "dumb"
=> true
>> $LOADED_FEATURES.include? "faster_csv.rb"
=> true

Any reason why this should happen?

Because this sounds like a bug, here is some system info.

[sandal@harmonix ~]$ ruby -v
ruby 1.8.4 (2005-12-24) [i686-linux]
[sandal@harmonix ~]$ gem -v
0.8.11
[sandal@harmonix ~]$ rake --version
rake, version 0.7.1
[sandal@harmonix ~]$ uname -a
Linux harmonix 2.6.16-ARCH #1 SMP PREEMPT Wed May 31 06:41:53 UTC 2006
i686 Mobile AMD Sempron(tm) Processor 3000+ AuthenticAMD GNU/Linux