This project is archived and is in readonly mode.

#173 ✓invalid
Tekin

config.gem will not load gems with a hyphen in the name

Reported by Tekin | May 12th, 2008 @ 07:27 PM

I'm guessing that some kind of string to symbol malarky is causing gems loading to fall over for gems with a hyphen in the name e.g.

config.gem 'git-rails'

config.gem 'mislav-will_paginate', :source => 'http://gems.github.com'

rake gems will not find either, even when they are installed.

Comments and changes to this ticket

  • Tekin

    Tekin May 12th, 2008 @ 07:29 PM

    rake gems produces the following error:

    no such file to load -- git-rails

    /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require'

    /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'

    /Library/Ruby/Gems/1.8/gems/activesupport-2.0.991/lib/active_support/dependencies.rb:508:in `require'

    /Library/Ruby/Gems/1.8/gems/activesupport-2.0.991/lib/active_support/dependencies.rb:353:in `new_constants_in'

    /Library/Ruby/Gems/1.8/gems/activesupport-2.0.991/lib/active_support/dependencies.rb:508:in `require'

    /Library/Ruby/Gems/1.8/gems/rails-2.0.991/lib/rails/gem_dependency.rb:56:in `load'

    /Library/Ruby/Gems/1.8/gems/activesupport-2.0.991/lib/active_support/core_ext/symbol.rb:11:in `__send__'

    /Library/Ruby/Gems/1.8/gems/activesupport-2.0.991/lib/active_support/core_ext/symbol.rb:11:in `to_proc'

    /Library/Ruby/Gems/1.8/gems/rails-2.0.991/lib/initializer.rb:240:in `each'

    /Library/Ruby/Gems/1.8/gems/rails-2.0.991/lib/initializer.rb:240:in `load_gems'

    /Library/Ruby/Gems/1.8/gems/rails-2.0.991/lib/initializer.rb:133:in `process'

    /Library/Ruby/Gems/1.8/gems/rails-2.0.991/lib/initializer.rb:89:in `send'

    /Library/Ruby/Gems/1.8/gems/rails-2.0.991/lib/initializer.rb:89:in `run'

    /Users/tekin/apps/steranko/config/environment.rb:14

    /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require'

    /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'

    /Library/Ruby/Gems/1.8/gems/activesupport-2.0.991/lib/active_support/dependencies.rb:508:in `require'

    /Library/Ruby/Gems/1.8/gems/activesupport-2.0.991/lib/active_support/dependencies.rb:353:in `new_constants_in'

    /Library/Ruby/Gems/1.8/gems/activesupport-2.0.991/lib/active_support/dependencies.rb:508:in `require'

    /Library/Ruby/Gems/1.8/gems/rails-2.0.991/lib/tasks/misc.rake:3

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'

    /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31

    /usr/bin/rake:19:in `load'

    /usr/bin/rake:19

  • Tekin

    Tekin May 12th, 2008 @ 07:49 PM

    OK, I should read error messages a bit more carefully, looks like it's a problem with rubygems...

  • Rich Cavanaugh

    Rich Cavanaugh May 12th, 2008 @ 11:55 PM

    Try:

    config.gem 'mislav-will_paginate', :lib => "will_paginate", :source => 'http://gems.github.com'

  • Tekin

    Tekin May 13th, 2008 @ 12:28 AM

    That's the ticket! Thanks, -1 for me...

  • josh

    josh June 13th, 2008 @ 06:44 AM

    • State changed from “new” to “invalid”
  • Anthony Green

    Anthony Green January 12th, 2009 @ 12:36 PM

    • Tag set to edge, railties, rake

    Would some kind soul please add a note outlining the cause of the 'bug' because I'm experiencing it too. Though I'm grateful for Rich's fix, explainations help the community grow their ruby/rails knowlede and enable us to help one another.

  • Anthony Green

    Anthony Green January 12th, 2009 @ 01:51 PM

    Found the answer: http://ryandaigle.com/articles/2...

    config.gems assumes the lib file is the same name as the gem hence the need to use :lib => lib_file_name

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages