#372 open
David Lee

dependency cannot load gems whose library file is different from the gem directory name

Reported by David Lee | June 14th, 2008 @ 07:38 AM | in 0.9.7

You can't require libraries that are within directories using dependency.

example: gem install google4r-maps

dependency 'google4r/maps' # error

require 'google4r/maps' # this works

Comments and changes to this ticket

  • David Lee

    David Lee June 15th, 2008 @ 03:00 AM

      • → Title changed from “dependency cannot load libraries from within directories” to “dependency cannot load gems whose library file is different from the gem directory name”

    Dependency does not load from gems whose gem name (directory name) is different from the actual .rb file name.

    For example:

    GeoRuby-1.3.3/lib/geo_ruby.rb

    (GeoRuby != geo_ruby)

    google4r-maps-0.1.0/lib/google4r/maps.rb

    (google4r-maps != google4r/maps)

    RubyInline-3.7.0/lib/inline.rb

    (RubyInLine != inline.rb)

  • David Lee

    David Lee June 15th, 2008 @ 03:45 AM

    In fact, you can't even load RedCloth as the config/init.rb example says because RedCloth is the gem (and directory) name, but redcloth.rb is the filename.

    Maybe this is a rubygems problem. I'm currently using the latest rubygems (version 1.1.1).

  • Michael Klishin (antares)

    Michael Klishin (antares) June 28th, 2008 @ 06:42 AM

      • → State changed from “new” to “open”
      • → Tag cleared.
      • → Milestone changed from “” to “0.9.4”

    dependencies will be gone before 1.0, just use require.

  • Michael Klishin (antares)

    Michael Klishin (antares) August 2nd, 2008 @ 11:40 AM

      • → Milestone changed from “0.9.4” to “0.9.6”
  • Michael Klishin (antares)

    Michael Klishin (antares) September 4th, 2008 @ 04:53 AM

      • → Milestone changed from “0.9.6” to “0.9.7”

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins