Local gem not always visible

B

billmcn

I wrote a gem for a package called "tree", version 0.0.0. I built a
gemfile and installed it. Now the code is installed and works, but
only some of the gem utitlities know that it's there. I suspect I did
something wrong in my gem specification file, but I can't figure out
what.

Does anyone have any ideas what is wrong or suggestions on how to
debug?

Here are the specifics of the problem: "gem list" and "gemwhich" find
my gem

$ gem list

*** LOCAL GEMS ***

rake (0.6.2)
Ruby based make-like utility.

rubygems-update (0.8.11)
RubyGems Update GEM

sources (0.0.1)
This package provides download sources for remote gem installation

tree (0.0.0)
Tree is an ordered n-ary branching tree structure

$ gemwhich tree
/homes/billmcn/lib/ruby/gems/1.8/gems/tree-0.0.0/lib/tree.rb

but 'gem specification' and 'gem uninstall' do not work

$ gem specification tree
ERROR: Unknown gem tree

$ gem uninstall tree
Attempting to uninstall gem 'tree'
ERROR: While executing gem ... (RuntimeError)
Unknown RubyGem: tree (> 0)

These commands work for other gems installed on my machine.

When I go look under /homes/billmcn/lib/ruby/gems/1.8 there appear to
be the appropriate cache, doc, gems, and specifications files and
subdirectories. In particular, here is the specfile

$ cat tree-0.0.0.gemspec
Gem::Specification.new do |s|
s.name = %q{tree}
s.version = "0.0.0"
s.date = %q{2005-12-01}
s.summary = %q{Tree is an ordered n-ary branching tree structure}
s.email = %q{[email protected]}
s.homepage = %q{http://www.washington.edu/~billmcn}
s.description = %q{This module implement order n-ary branching tree
structures. It includes support for breadth- and depth- first
iteration, and serialization to and from a bracketed tree string.}
s.has_rdoc = true
s.authors = ["W.P. McNeill"]
s.files = ["test/test_tree.rb", "lib/tree.rb", "README"]
s.test_files = ["test/test_tree.rb"]
s.rdoc_options = ["--title", "Tree -- Ruby Tree", "--main", "README",
"--line-numbers", "--inline-source"]
s.extra_rdoc_files = ["README"]
end


This is RedHat Linux. Ruby version

$ ruby -v
ruby 1.8.3 (2005-09-21) [i686-linux]

Note that I don't have write permissions to /usr so this version of
Ruby is installed in my home directory.

RUBYOPT=rubygems is set. Here is my gems environment

$ gem env
Rubygems Environment:
- VERSION: 0.8.11 (0.8.11)
- INSTALLATION DIRECTORY: /homes/billmcn/lib/ruby/gems/1.8
- GEM PATH:
- /homes/billmcn/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org


Thanks for any suggestions you have.
 
C

Chad Fowler

I wrote a gem for a package called "tree", version 0.0.0. I built a
gemfile and installed it. Now the code is installed and works, but
only some of the gem utitlities know that it's there. I suspect I did
something wrong in my gem specification file, but I can't figure out
what.

Does anyone have any ideas what is wrong or suggestions on how to
debug?

Hi. I bet this is due to a bug that was fixed in CVS wherein gem
files with version 0.0.0 are not properly accounted for in some cases.
Would it be possible to get rubygems from its RubyForge CVS
repository and try it out?

Thanks!
--
Chad Fowler
http://chadfowler.com
http://pragmaticprogrammer.com/titles/mjwti/ (My Job Went to India,
and All I Got Was This Lousy Book)
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over one million gems served!)
 
B

billmcn

This appears to be the problem. I didn't check out the latest rubygems
from CVS, but I did change the version on my tree gem from 0.0.0 to
0.0.1 and everything worked fine.

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top