[Win32utils-devel] Re: [ANN] RubyGems 0.2.0

win32utils-devel@rubyforge.org
2004-03-15T18:41:41Z

On Mon, 15 Mar 2004, Shashank Date wrote:

# Chad,
#
#
# > I forgot to ask one thing!  Shall we put your gems up on
# > http://gems.rubyforge.org?  We haven''t yet figured out how we
want to
# > support binary gems when they can work across platforms, but for
# > windows-only gems like these, there''s no reason we
can''t make them
# > available.
#
# Why not ? Let me know what I should do next.
#

The easiest thing to do would be to create the gems and release them in
RubyForge.  We are going to write a script to run on RubyForge that grabs
all of the released gems from the project files area.  For now, just let
me know when they''re up and we can do it manually.


#
# Meanwhile a few more questions. I haven''t quite understood the
purpose
# of the following lines in gemspec:
#
# #-----------------------------------------
#  ## What other platform can it be?
#  s.platform = Gem::Platform::RUBY
#
#  ## What do these lines do and how to mention multiple requirements?
#  s.requirements << ''drb''
#  s.require_path = ''lib''
#  s.autorequire = ''legoR''
# #-----------------------------------------
#

We really need to document this better:

"requirements" are things like "Windows", "A web
server", or "Enough
patience to deal with an alpha release"--things you can''t check
for
programatically, but the user can read.

"require_path" is where the LOAD_PATH needs to be set in relation to
your
installed gem.  In legoR, for example, you put your library code under
"lib", so the require_path you have above is correct.  If you just had
the
code in the root of the distribution, you would set require_path to blank.
When you run the following:

  require_gem ''legoR''

...it will look in the lib directory for the most recent version of legoR
that you have installed, at which point it will "autorequire" legoR.rb
(which means it actually loads the library).  require_gem really just
modifies the LOAD_PATH, so you will almost always want to specify an
auto_require for your gem.


# And it seems I cannot get uninstall to work:
#
# C:\legoR>gem -i legoR-0.0.1.gem
# Successfully installed legoR version 0.0.1
#
# C:\legoR>gem -u legoR-0.0.1.gem
# Unknown RubyGem: legoR-0.0.1.gem-> 0.0.0
#


We need to add this in as a feature (running an uninstall on a gem file).
We''ll put it in the next release.  For now, you can do:

gem -u legoR --version 0.0.1

Thanks for the help and support!  The only way to make this thing stick
and finally solve the "Ruby has no CPAN" problem is to get gems made!

Chad