[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RubyGems and RPA

James Gray

10/4/2004 11:31:00 PM

Having just read the RubyGems chapter in the Pickaxe II, I'm curious
about how it compares to RPA. I'm not trying to start a war here, but
I would like some information about their differences, if someone would
be so helpful.

Do they solve the same problem, or am I confused? Are there
differences in their design philosophy or fundamental differences in
their operation? Do they offer a similar range of packages? Can both
be installed and peacefully coexist? Any thing else I should know
about either?

Again, I'm not trying to start a fight, I'm just trying to learn more
about my options. Thanks.

James Edward Gray II



30 Answers

Bill Atkins

10/4/2004 11:39:00 PM

0

RPA and RubyGems both solve the same problem (automatic installation
of Ruby packages and their dependencies), but they have some
philosophical differences on how the software should work and where
the packages should come from. It basically comes down to your choice
of which to use.

With RubyGems, a package's author creates a .gem file and uploads it
to RubyForge. RubyGems installations can then access that .gem file
and use it to install the associated software.

With RPA, installation scripts are managed by a team at RPA (currently
just Mauricio Fernandez, AFAIK) who create the installation scripts
themselves and then offer them from their server.

There are also several differences in the software associated with
each (gem and rpa-base, respetively). RubyGems installs a gem's files
into their own directory; RPA installs them into Ruby's library
directories. RPA builds are atomic, meaning that if something goes
wrong, the installation is completely reversed. RubyGems builds are
not atomic, since the files are installed into a separate directory.

Hope that helps.

Bill Atkins

P.S. I prefer RPA :)

On Tue, 5 Oct 2004 08:30:39 +0900, James Edward Gray II
<james@grayproductions.net> wrote:
> Having just read the RubyGems chapter in the Pickaxe II, I'm curious
> about how it compares to RPA. I'm not trying to start a war here, but
> I would like some information about their differences, if someone would
> be so helpful.
>
> Do they solve the same problem, or am I confused? Are there
> differences in their design philosophy or fundamental differences in
> their operation? Do they offer a similar range of packages? Can both
> be installed and peacefully coexist? Any thing else I should know
> about either?
>
> Again, I'm not trying to start a fight, I'm just trying to learn more
> about my options. Thanks.
>
> James Edward Gray II
>
>


Gavin Sinclair

10/5/2004 12:53:00 AM

0

On Tuesday, October 5, 2004, 9:30:39 AM, James wrote:

> Having just read the RubyGems chapter in the Pickaxe II, I'm curious
> about how it compares to RPA. I'm not trying to start a war here, but
> I would like some information about their differences, if someone would
> be so helpful.

> Do they solve the same problem, or am I confused?

Same problem: management of Ruby libraries and applications. Install,
uninstall, and query.

gem install rake

rpa install rake

Pretty similar.

> Are there differences in their design philosophy or fundamental
> differences in their operation?

Yes. RubyGems puts each gem (package) in its own directory, rather
than installing everything into site_ruby/1.8/. This is specifically
designed so that you can have multiple versions installed, and take
advantage of that to ensure dependencies are met. For example, one
person on this list was using ActiveRecord, but could only use an old
one because of threading issues with the current release. So...

require_gem 'activerecord', '= 0.7.4'

Meant that his code would _only_ work if ActiveRecord v0.7.4 was
installed as a gem on the user's computer.

RPA is more transparent -- installs go into site_ruby and you access
them like any directly-installed package. It's got some other magic
going on, which escapes me at the moment.

With RubyGems, we try to make it as easy as possible, but the ability
to install and use multiple versions of packages puts a limit on the
transparency.

> Do they offer a similar range of packages?

Yes. It's RPA's 120 to RubyGems's 100 at the moment, with significant
overlap.

> Can both be installed and peacefully coexist?

Yes. That should always be the case.

> Any thing else I should know about either?

The main point of RPA is quality control. It's a "Production
Archive". Eventually there will be "RPA versions" so you can access a
suite of libraries all tested to work together. It's centrally
managed.

RubyGems is a decentralised package manager that treats each gem (and
each version of each gem) as independent. If you have a RubyForge
project, you just "release" your .gem file there, and it will go into
the repository.

> Again, I'm not trying to start a fight, I'm just trying to learn more
> about my options. Thanks.

No worries. Hope you enjoy them. We're lucky to have two package
managers when a year ago we had none. Both were borne of the
frustration of going years without one, I guess.

Gavin




why the lucky stiff

10/5/2004 3:01:00 AM

0

Gavin Sinclair (gsinclair@soyabean.com.au) wrote:
>
> > Can both be installed and peacefully coexist?
>
> Yes. That should always be the case.
>

It'd be great if there was an rpa-base gem, though. And criss-cross.

_why


Chad Fowler

10/5/2004 10:31:00 AM

0

On Tue, 5 Oct 2004 12:00:31 +0900, why the lucky stiff
<ruby-talk@whytheluckystiff.net> wrote:
> Gavin Sinclair (gsinclair@soyabean.com.au) wrote:
> >
> > > Can both be installed and peacefully coexist?
> >
> > Yes. That should always be the case.
> >
>
> It'd be great if there was an rpa-base gem, though. And criss-cross.
>

There was at one point, but it was screwed up (my fault) so we removed
it. Then you could use rubygems to install rpa-base, which you could
use to install rubygems, which you could use to install rpa-base....
;)


Eivind Eklund

10/5/2004 11:09:00 AM

0

Association disclaimer: I'm the original architect of the RPA vision
(with Mauricio being the one having done most of the work and that
should have most of the credit). I'm also trying to help RubyGems get
the best possible system, and believe that if both systems are well
architected they will serve different roles (RPA for production,
RubyGems for zero-delay packages) and form a symbiosis.

On Tue, 5 Oct 2004 08:38:48 +0900, Bill Atkins <batkins57@gmail.com> wrote:
> RPA and RubyGems both solve the same problem (automatic
> installation of Ruby packages and their dependencies),

Yes and no. RPA attempts to solve a broader problem than this: Making
packages available in a form where they are useable in production.
Automatic installation is one part of this, but another part of it is
to keep the packages available over time, and provide a point of
contact for patches so the packages are maintained over time. You can
see the RPA manifesto here:
http://rpa-base.rubyforge.org/wiki/wiki.cgi?Rp...

In accordance with this, RPA also tries to provide various
documentation that helps its goal. Examples are
http://rpa-base.rubyforge.org/wiki/wiki.cgi?Pack... (for
finding the packages you need for production),
http://rpa-base.rubyforge.org/wiki/wiki.cgi?Goo... (helping the
libraries we package be the best they can), and
http://rpa-base.rubyforge.org/wiki/wiki.cgi?Goo... (documenting
what practices makes it easy for us and other packagers).

As a courtesy to other packagers, RPA also has as a goal that it
should be possible to repackagage RPA packages in e.g. Debian or
FreeBSD.


RubyGems attempts to solve the problem of letting authors create
packages. Information about how to package etc is available at
http://rubygems.rubyforge.org/wi...

For future directions, RubyGems has
http://onestepback.org/articles/rubygemsfacets/possiblerubygemsdirec...

RubyGems are presently somewhat troublesome to repackage (due to
containing too little policy to be able to fit with requirements from
other systems - the problems are directory structure and require_gem),
but this will hopefully be fixed in the future, as a part of RubyGems
goal of being the "standard" packaging system for authors (and the
only release they need to do.) For the time being, repackagers
request that developers also release as .tar.gz or similar.

Eivind.


Ara.T.Howard

10/5/2004 1:36:00 PM

0

Alexander Kellett

10/5/2004 2:25:00 PM

0

On Tue, Oct 05, 2004 at 08:38:48AM +0900, Bill Atkins wrote:
> With RPA, installation scripts are managed by a team at RPA (currently
> just Mauricio Fernandez, AFAIK) who create the installation scripts
> themselves and then offer them from their server.

package authors can also publish rpa packages
on their own site via rpa's http install. e.g:

rpa install http://www.lypanov.net/ruvi-prerelease_0....

:)

Alex

p.s: if you've got a stable version, remember "rpa remove ruvi" first
i'm too lazy to make a pkg which has a differently named script :P


Chad Fowler

10/6/2004 1:48:00 PM

0

On Tue, 5 Oct 2004 20:09:10 +0900, Eivind Eklund <eeklund@gmail.com> wrote:
> RubyGems are presently somewhat troublesome to repackage (due to
> containing too little policy to be able to fit with requirements from
> other systems - the problems are directory structure and require_gem),
> but this will hopefully be fixed in the future, as a part of RubyGems
> goal of being the "standard" packaging system for authors (and the
> only release they need to do.) For the time being, repackagers
> request that developers also release as .tar.gz or similar.
>

I'm surprised to hear you say this. .tar.gz files contain _less_
policy than RubyGems. And less metadata. I'm sure there are _some_
scenarios where gem authors might do something that makes RPA's job a
little harder, but I would guess that in most cases, thinking about a
package management system will cause them to solve some of the
problems that would have to be solved for RPA. An example is Austin's
work on gem/rpa-ifying Ruwiki, which has required him to change things
about how Ruwiki works.

To accomodate both systems in a package-management-system-neutral way
will probably require additional "standard" abstractions that
packagers and authors can rely on just being there (included with the
ruby distribution, probably). The only way to really find out is to
create more packages.

I'd love to collect specific examples (on a Wiki--not ruby-talk) of
gem packages that do gem-specific things in such a way that it makes
things difficult for RPA. We can polish these rough edges away over
time as we move toward 1.0 of both systems. The ideal scenario is
that any RubyGem can be RPA-ified (pre QA) with a single script. And
vice versa.

Chad


Eivind Eklund

10/6/2004 3:42:00 PM

0

On Wed, 6 Oct 2004 22:48:07 +0900, Chad Fowler <chadfowler@gmail.com> wrote:
> On Tue, 5 Oct 2004 20:09:10 +0900, Eivind Eklund <eeklund@gmail.com> wrote:
> > RubyGems are presently somewhat troublesome to repackage (due to
> > containing too little policy to be able to fit with requirements from
> > other systems - the problems are directory structure and require_gem),
> > but this will hopefully be fixed in the future, as a part of RubyGems
> > goal of being the "standard" packaging system for authors (and the
> > only release they need to do.) For the time being, repackagers
> > request that developers also release as .tar.gz or similar.
> >
>
> I'm surprised to hear you say this. .tar.gz files contain _less_
> policy than RubyGems. And less metadata.

I was imprecise here; what I meant was a .tar.gz + standard setup.rb.

And I'm surprised that you are surprised; I've been hearing grumbling
from various packagers, not just RPA. This is one of the things that
has been having me frustrated.

> To accomodate both systems in a package-management-system-neutral way
> will probably require additional "standard" abstractions that
> packagers and authors can rely on just being there (included with the
> ruby distribution, probably). The only way to really find out is to
> create more packages.

I see operating system specific packaging as extremely important, too.
There are a lot of people that just won't use Ruby programs if they
cannot be installed through the native operating system packages - and
there are a lot of packaging gruops that will not accept a
single-directory solution a la RubyGems. This may actually be most
groups - it is at least most groups that I know about.

I'm not sure if we need changes to the Ruby base or not - but
attempting to do the package conversion tools should help us find out.
RPA are working on exports to different packaging formats (we've got
RPM, and are working on.deb and FreeBSD ports at the moment - or
bitserf and Mauricio is, with feedback, help and adoptions from the
rest of us).

> I'd love to collect specific examples (on a Wiki--not ruby-talk) of
> gem packages that do gem-specific things in such a way that it makes
> things difficult for RPA. We can polish these rough edges away over
> time as we move toward 1.0 of both systems. The ideal scenario is
> that any RubyGem can be RPA-ified (pre QA) with a single script. And
> vice versa.

And converted to other packaging systems, including respecting their
policies. I believe this is a very important goal - something that
may be significant enough to make or break Ruby as a platform (though
I'm not sure if it is or isn't.)

If we can make this possible, it would be great - I think it could
help raise adoption of Ruby a lot. Conversely, if we make this
harder, we lower the adoption.

This is sort of orthogonal to the use of the "native Ruby" packaging
systems themselves.

Eivind.


Chad Fowler

10/6/2004 5:19:00 PM

0

On Thu, 7 Oct 2004 00:42:07 +0900, Eivind Eklund <eeklund@gmail.com> wrote:
> On Wed, 6 Oct 2004 22:48:07 +0900, Chad Fowler <chadfowler@gmail.com> wrote:
> > On Tue, 5 Oct 2004 20:09:10 +0900, Eivind Eklund <eeklund@gmail.com> wrote:
> > > RubyGems are presently somewhat troublesome to repackage (due to
> > > containing too little policy to be able to fit with requirements from
> > > other systems - the problems are directory structure and require_gem),
> > > but this will hopefully be fixed in the future, as a part of RubyGems
> > > goal of being the "standard" packaging system for authors (and the
> > > only release they need to do.) For the time being, repackagers
> > > request that developers also release as .tar.gz or similar.
> > >
> >
> > I'm surprised to hear you say this. .tar.gz files contain _less_
> > policy than RubyGems. And less metadata.
>
> I was imprecise here; what I meant was a .tar.gz + standard setup.rb.
>
> And I'm surprised that you are surprised; I've been hearing grumbling
> from various packagers, not just RPA. This is one of the things that
> has been having me frustrated.
>

I'd like to hear the grumbling. Specifically, it's important to hear
of specific scenarios where something is created as a RubyGem and it
_hurt_ the ability to repackage it. As I said below, specifics are
important. "grumbling" doesn't help if we don't hear what people are
grumbling about. Even pointing out areas that might be problems isn't
nearly as valuable as pointing out a specific scenario where something
was made difficult by RubyGems.

That being said, the RubyGems developers aren't encouraging people to
only create gems. But, we _are_ encouraging everyone to make gems for
everything. With tools like Rake, it's dead easy (for most projects)
to generate .tar.gz and .gem files at the same time.

We also want to continue to hear about issues people have in making
gems--where our current system doesn't do everything it needs to for
apps and libs with specific needs. We've gotten a lot of great
feedback from the many users who have been using the system so far,
and I expect that as we see an increasing number of packages, we'll
learn that much more and make RubyGems better and better.

> > To accomodate both systems in a package-management-system-neutral way
> > will probably require additional "standard" abstractions that
> > packagers and authors can rely on just being there (included with the
> > ruby distribution, probably). The only way to really find out is to
> > create more packages.
>
> I see operating system specific packaging as extremely important, too.
> There are a lot of people that just won't use Ruby programs if they
> cannot be installed through the native operating system packages - and
> there are a lot of packaging gruops that will not accept a
> single-directory solution a la RubyGems. This may actually be most
> groups - it is at least most groups that I know about.
>

In this scenario, as I imagine for RPA eventually, it would probably
work best to auto-generate (at least the skeleton for) native packages
out of gems. People in this category won't want to use "gem install
blah", but I still believe that installation and package creation can
be made easier by starting with a gem file. RubyGems has install-time
and run-time behavior. After you've extracted a gem, you can
literally just point to it directly by changing your $: somehow and
completely forego "require_gem", etc. "gem install" could be an early
step in a semi-atomated .deb or .rpm generator, for example.

> I'm not sure if we need changes to the Ruby base or not - but
> attempting to do the package conversion tools should help us find out.
> RPA are working on exports to different packaging formats (we've got
> RPM, and are working on.deb and FreeBSD ports at the moment - or
> bitserf and Mauricio is, with feedback, help and adoptions from the
> rest of us).
>
> > I'd love to collect specific examples (on a Wiki--not ruby-talk) of
> > gem packages that do gem-specific things in such a way that it makes
> > things difficult for RPA. We can polish these rough edges away over
> > time as we move toward 1.0 of both systems. The ideal scenario is
> > that any RubyGem can be RPA-ified (pre QA) with a single script. And
> > vice versa.
>
> And converted to other packaging systems, including respecting their
> policies. I believe this is a very important goal - something that
> may be significant enough to make or break Ruby as a platform (though
> I'm not sure if it is or isn't.)
>
> If we can make this possible, it would be great - I think it could
> help raise adoption of Ruby a lot. Conversely, if we make this
> harder, we lower the adoption.
>
> This is sort of orthogonal to the use of the "native Ruby" packaging
> systems themselves.
>

Somewhat orthogonal in terms of the goal, but not very much so technically.

To summarize, I have a request: If anyone is trying to repackage
rubygems for any other system--native or not (RPA)--please keep the
feedback coming. We want to know if it was hard or even if it was
easy. Without hearing your specific stories, it's not going to get
better much faster. The rubygems-developers list on RubyForge is the
best place to send this kind of thing.

Thanks,
Chad