[ANN] RubyGems 0.2.0

The first public release of RubyGems (http://rubygems.rubyforge.org)
has just been uploaded to RubyForge.

A concept initially demonstrated by Ryan Leavengood at the first
RubyConf, RubyGems has been a long time coming. It is a package manager
for Ruby libraries, handling library versioning (allows co-existence of
multiple versions of a single Ruby library), search, download, and
installation.

You can download RubyGems from its RubyForge files section
(http://rubyforge.org/project/showfiles.php?group_id=126). We have
tested on Windows XP, Mac OSX, and Linux. We would love to hear
reports, both negative and positive, of experiences on other platforms.

We have put a few samples gems in the repository at
http://gems.rubyforge.org. This is the default location that the
remote installer will go to when doing a remote installation. If you
have libraries you would like to include, please send the gem files to
either myself or Rich Kilmer (rich(at)infoether.com) and we’ll add
them. Going forward, we’ll have more robust mechanisms for updating
the repository, possibly including RubyForge file release integration.
You can search the repository like so:

 tashi-delek:~ chadfowler$ gem --search=doom
 ruby-doom-0.0.7

A brief overview of features present in the 0.2.0 release:

  • Install and uninstall gems locally
  • Search, download, and install gems via HTTP
  • Manage dependencies between gems
  • Auto-generate documentation from rdoc
  • Serve gems via webrick or CGI

And on the TODO shortlist:

  • Deal with binary libraries
  • Support for Ruby applications (as opposed to just libraries)
  • Auto-generate RPM, pkg, windows installer, etc.

User documentation is available at
http://rubygems.rubyforge.org/wiki/wiki.pl?UserDoc.
RubyGems requires ruby 1.8.1

Have fun!

Thanks,
The RubyGems developers

cool thanks, but:
rubygems-0.2.0>gem --remote-insta
ll=redcloth
c:/programmi/ruby-1.8/ruby/lib/ruby/site_ruby/rubygems/remote_installer.rb:78:in
find_latest_valid_package_in_caches': Could not find redcloth > 0.0.0 (Runtime Error) from c:/programmi/ruby-1.8/ruby/lib/ruby/site_ruby/rubygems/remote_insta ller.rb:15:in install’
from c:/programmi/ruby-1.8/ruby/bin/gem:74

running pragprog installer for 1.8.1 on winxp pro

···

il Mon, 15 Mar 2004 08:29:18 +0900, Chad Fowler chad@chadfowler.com ha scritto::

The first public release of RubyGems (http://rubygems.rubyforge.org)
has just been uploaded to RubyForge.

downloaded it and tried it out :slight_smile: very nice… Thank you, this is a very
cool project. I can’t wait to see more gems up there!

One minor nit: RubyGems’ install.rb doesn’t take arguments. I tried
‘ruby install.rb --help’ to see if there were any config options, and
it tried to install itself. But really, a minor nit, since I downloaded
it to install it anyway :slight_smile:

Oh, and a question: documentation. Is there a way to get ri to pull up
the gems’ documentation? It would be very cool if all the docs could
be self-contained in the same folder as the gem.

Thanks again! great work :slight_smile:

–Mark

···

On Mar 14, 2004, at 3:29 PM, Chad Fowler wrote:

The first public release of RubyGems (http://rubygems.rubyforge.org)
has just been uploaded to RubyForge.

In article 67E2AB2D-760F-11D8-AAE6-000A95BDA42A@chadfowler.com,

The first public release of RubyGems (http://rubygems.rubyforge.org)
has just been uploaded to RubyForge.

A concept initially demonstrated by Ryan Leavengood at the first
RubyConf, RubyGems has been a long time coming. It is a package manager
for Ruby libraries, handling library versioning (allows co-existence of
multiple versions of a single Ruby library), search, download, and
installation.

You can download RubyGems from its RubyForge files section
(http://rubyforge.org/project/showfiles.php?group_id=126). We have
tested on Windows XP, Mac OSX, and Linux. We would love to hear
reports, both negative and positive, of experiences on other platforms.

We have put a few samples gems in the repository at
http://gems.rubyforge.org. This is the default location that the
remote installer will go to when doing a remote installation. If you
have libraries you would like to include, please send the gem files to
either myself or Rich Kilmer (rich(at)infoether.com) and we’ll add
them. Going forward, we’ll have more robust mechanisms for updating
the repository, possibly including RubyForge file release integration.
You can search the repository like so:

tashi-delek:~ chadfowler$ gem --search=doom
ruby-doom-0.0.7

A brief overview of features present in the 0.2.0 release:

  • Install and uninstall gems locally
  • Search, download, and install gems via HTTP
  • Manage dependencies between gems
  • Auto-generate documentation from rdoc
  • Serve gems via webrick or CGI

And on the TODO shortlist:

  • Deal with binary libraries
  • Support for Ruby applications (as opposed to just libraries)
  • Auto-generate RPM, pkg, windows installer, etc.

User documentation is available at
http://rubygems.rubyforge.org/wiki/wiki.pl?UserDoc.
RubyGems requires ruby 1.8.1

I’ve yet to try it, but I did glance at the docs today and it does look
ery nice.

So I gather from the comment above about binary libraries there is no way
yet to handle gems which have extensions (C code)? Any idea when we’ll
see this?

Will we be seeing RubyGems in 1.8.2?

Phil

···

Chad Fowler chad@chadfowler.com wrote:

Hello Chad,

Monday, March 15, 2004, 12:29:18 AM, you wrote:

The first public release of RubyGems
(http://rubygems.rubyforge.org)
has just been uploaded to RubyForge.

Can you please work an a clean and unambiguity way to report errors.
I asks this because we want add a Ruby Gems framework to our Ruby Distribution
that comes with our "Arachno Ruby IDE". And the current way of
throwing exceptions isn't very good for a GUI wrapper.

···

--
Best regards,
Lothar mailto:mailinglists@scriptolutions.com

it’s case sensitive:
% sudo gem --remote-install=RedCloth
Successfully installed RedCloth version 2.0.2

–Mark

···

On Mar 14, 2004, at 11:04 PM, gabriele renzi wrote:

il Mon, 15 Mar 2004 08:29:18 +0900, Chad Fowler chad@chadfowler.com > ha scritto::

The first public release of RubyGems (http://rubygems.rubyforge.org)
has just been uploaded to RubyForge.

cool thanks, but:
rubygems-0.2.0>gem --remote-insta
ll=redcloth
c:/programmi/ruby-1.8/ruby/lib/ruby/site_ruby/rubygems/
remote_installer.rb:78:in
`find_latest_valid_package_in_caches’: Could not find redcloth >

gabriele renzi wrote:

cool thanks, but:
rubygems-0.2.0>gem --remote-install=redcloth
c:/programmi/ruby-1.8/ruby/lib/ruby/site_ruby/rubygems/remote_installer.rb:78:in
`find_latest_valid_package_in_caches’: Could not find redcloth >

case-sensitive.

bash-2.05b$ sudo gem --remote-install=RedCloth
Successfully installed RedCloth version 2.0.2
bash-2.05b$ gem --list
sources-0.0.1
RedCloth-2.0.2

solid work, chad, rich, others. this is killer. package authors: mob
these guys with gems! serious. gem dogpile, folks.

_why

Is there a way to get ri to pull up the gems’ documentation?
er, sorry, I guess I should have read the docs more carefully.
Apparently the --gen-rdoc option does that when you install.

–Mark

I’ve yet to try it, but I did glance at the docs today and it does look
ery nice.

Please try it and give us your feedback…would welcome all help (and
input)
we can get!

So I gather from the comment above about binary libraries there is no
way
yet to handle gems which have extensions (C code)? Any idea when we’ll
see this?

Well, you can actually build a gem that contains a binary extension,
but you
need to mark it as platform specific (i.e. it can contain .so files).
We
are trying to work out the building from source…so the gem contains
the
c/c++/ruby code and it is downloaded, extracted, built and deployed.
That is
a target for the next release (or the one after).

Will we be seeing RubyGems in 1.8.2?

That is up to Matz and the Ruby community. We would like to see it in
the Ruby distro, obviously, but there are still things to flush out
prior
to that.

···

On Mar 15, 2004, at 11:39 PM, Phil Tomson wrote:

Phil

I’ve got a generic method that copies files. I want to preserve the
attributes of the source file in the destination file. I started using this:

require “ftools”

File.copy(src_file, dest_dir)

This works until I encounter a read-only file, then I get an exception:

c:/ruby/lib/ruby/1.8/ftools.rb:23:in `initialize’:
Permission denied - E:\Dev\RubyDev\rubyinstaller\c
vs-repo\installer\stable/doc\DBD/ODBC-0.96/COPYING
(Errno::EACCES)

So I tried switching to FileUtils.cp, and got the same error. I also trued
this:

FileUtils.chmod( 0644, src_file)
FileUtils.cp(src_file, dest_dir)

But still it still doesn’t work – I get the same error:

c:/ruby/lib/ruby/1.8/fileutils.rb:409:in `initialize’:
Permission denied - E:\Dev\RubyDev\rubyinstaller\cvs-r
epo\installer\stable/doc\DBD/ODBC-0.96/COPYING (Errno:
:EACCES)

So, how do you copy read-only files in ruby?

Curt

Hello Chad,

Monday, March 15, 2004, 12:29:18 AM, you wrote:

The first public release of RubyGems
(http://rubygems.rubyforge.org)
has just been uploaded to RubyForge.

Can you please work an a clean and unambiguity way to report errors.
I asks this because we want add a Ruby Gems framework to our Ruby
Distribution
that comes with our “Arachno Ruby IDE”. And the current way of
throwing exceptions isn’t very good for a GUI wrapper.

I responded privately without realizing this went to ruby-talk too.
ruby-talk is probably a more productive forum for the question: how
would you like to see error handling work if not with exceptions?
There is definitely a lot of cleaning work to be done on how errors are
handled, so input at this stage would be very useful.

Thanks,
Chad

···

On Mar 21, 2004, at 8:33 AM, Lothar Scholz wrote:

Actually, you were right. --gen-rdoc generates html output (which can
be served by gem_server or read directly), but it doesn’t support
rdoc’s --rite-site equivalent. Dave released that feature a couple of
days after we did the rdoc work, and we never went back and put it in.
Thanks for the suggestion. That’ll definitely go on the TODO list.

Chad

···

On Mar 15, 2004, at 3:00 AM, Mark Hubbart wrote:

Is there a way to get ri to pull up the gems’ documentation?
er, sorry, I guess I should have read the docs more carefully.
Apparently the --gen-rdoc option does that when you install.

–Mark

gabriele renzi wrote:

cool thanks, but:
rubygems-0.2.0>gem --remote-install=redcloth
c:/programmi/ruby-1.8/ruby/lib/ruby/site_ruby/rubygems/
remote_installer.rb:78:in
`find_latest_valid_package_in_caches’: Could not find redcloth >

case-sensitive.

What do you all think–should this be case sensitive or not? It’s
obviously a pretty easy thing to change.

bash-2.05b$ sudo gem --remote-install=RedCloth
Successfully installed RedCloth version 2.0.2
bash-2.05b$ gem --list
sources-0.0.1
RedCloth-2.0.2

solid work, chad, rich, others. this is killer. package authors: mob
these guys with gems! serious. gem dogpile, folks.

You heard the man! :slight_smile:

Chad

···

On Mar 15, 2004, at 2:37 AM, why the lucky stiff wrote:

Mark Hubbart discord@mac.com wrote in message news:28C7243A-7653-11D8-9C17-000502FDD5CC@mac.com

it’s case sensitive:
% sudo gem --remote-install=RedCloth
Successfully installed RedCloth version 2.0.2

oops, I should have read the message with more care… anyway I think
gem could give a more understandable message…
thanks, rubygem is freaking cool, I’m waiting for the ability to build
native packages (i.e. rpm, deb, msi…) :slight_smile:

I’ve got a generic method that copies files. I want to preserve the
attributes of the source file in the destination file. I started using this:

require “ftools”

File.copy(src_file, dest_dir)

This works until I encounter a read-only file, then I get an exception:

c:/ruby/lib/ruby/1.8/ftools.rb:23:in `initialize’:
Permission denied - E:\Dev\RubyDev\rubyinstaller\c
vs-repo\installer\stable/doc\DBD/ODBC-0.96/COPYING
(Errno::EACCES)

Yes. That’s because you don’t have permission to read it, as expected.

So, how do you copy read-only files in ruby?

You can’t. That’s what read-only means. Try it at the command prompt,
you won’t be able to copy it there, either.

I believe you have to chmod it first, then chmod it back. Assuming
you’re the owner.

Joe

···

In article EAENKKNOJPMNCDMLDOMLIENNDJAA.curt@hibbs.com, Curt Hibbs wrote:

Richard Kilmer wrote:

Well, you can actually build a gem that contains a binary extension,
but you need to mark it as platform specific (i.e. it can contain
.so files). We are trying to work out the building from source…so
the gem contains the c/c++/ruby code and it is downloaded, extracted,
built and deployed.

I’d like to ask for having both: A choice to install precompiled
binaries for whatever OS you’re using (if they’re available) and
building them on by itself. I would like it to try to build it from
sources at first and then try using a precompiled binary as a fallback.
(If no compiler is available or compiling fails for whatever reason.)

That would make all this even more of the killer application it’s
already starting to be. :slight_smile:

Thanks for developing this and listening to feedback!

Regards,
Florian Gross

Don’t wait…code it! :wink:

Seriously, we probably have people who are OK with Mac and Debian
installers. If anyone wanted to join the rubygems list and start
working on, for example, RPM or msi, it would be greatly appreciated.

You’re obviously right about the ugly error messages.

Thanks,
Chad

···

On Mar 15, 2004, at 5:59 AM, gabriele renzi @ google wrote:

Mark Hubbart discord@mac.com wrote in message
news:28C7243A-7653-11D8-9C17-000502FDD5CC@mac.com

it’s case sensitive:
% sudo gem --remote-install=RedCloth
Successfully installed RedCloth version 2.0.2

oops, I should have read the message with more care… anyway I think
gem could give a more understandable message…
thanks, rubygem is freaking cool, I’m waiting for the ability to build
native packages (i.e. rpm, deb, msi…) :slight_smile:

I’d say the following interface would be best:

$ gem --remote-install=redcloth
Package “redcloth” not found. Closest match: “RedCloth”.

$ gem --remote-install=RedClith
Package “RedClith” not found. Closest match: “RedCloth”.

I’d rather not lose case-sensitivity in installations. Searching for
a package should be case-instensitive by default though.

There’s a fuzzy matching algorithm for strings among the RubyForge
snippets. (Convert both strings to lowercase before fuzzy matching.)

Cheers,
Gavin

P.S. Good work. Nice to see it coming together.

···

On Monday, March 15, 2004, 9:52:34 PM, Chad wrote:

On Mar 15, 2004, at 2:37 AM, why the lucky stiff wrote:

gabriele renzi wrote:

cool thanks, but:
rubygems-0.2.0>gem --remote-install=redcloth
c:/programmi/ruby-1.8/ruby/lib/ruby/site_ruby/rubygems/
remote_installer.rb:78:in
`find_latest_valid_package_in_caches’: Could not find redcloth >

case-sensitive.

What do you all think–should this be case sensitive or not? It’s
obviously a pretty easy thing to change.

Curt Hibbs wrote:

I’ve got a generic method that copies files. I want to preserve the
attributes of the source file in the destination file. I started using this:

require “ftools”

File.copy(src_file, dest_dir)

This works until I encounter a read-only file, then I get an exception:

c:/ruby/lib/ruby/1.8/ftools.rb:23:in `initialize’:
Permission denied - E:\Dev\RubyDev\rubyinstaller\c
vs-repo\installer\stable/doc\DBD/ODBC-0.96/COPYING
(Errno::EACCES)

Perhaps you’ve repeated the copy and you already have a read-only
version in your dest directory which ftools is trying to write to ??

daz

Duh. read-only, not write-only. Ignore me.

Joe

···

In article slrnc5d6mm.b35.joe@gate.notcharles.ca, Joe Mason wrote:

This works until I encounter a read-only file, then I get an exception:

c:/ruby/lib/ruby/1.8/ftools.rb:23:in `initialize’:
Permission denied - E:\Dev\RubyDev\rubyinstaller\c
vs-repo\installer\stable/doc\DBD/ODBC-0.96/COPYING
(Errno::EACCES)

Yes. That’s because you don’t have permission to read it, as expected.