RubyGem and Rake

I’m switching over to using RubyGems. I like it!

When I removed the “normal” Rake install and typed “gem --remote-install
rake”, it succeeded with the message “Successfully installed rake version
0.3.1”.

It took me a while to find the “rake” executable, though. It used to go in
/usr/local/bin/rake, but it looks like it is now in
/usr/local/lib/ruby/gems/1.9/rake-0.3.1/lib/rake.

Do all executables installed by gems go in the gem directory instead of
/usr/local? If so, I would like to suggest that gems put their executables in
/usr/local/ instead, so that users don’t have to modify their paths by adding
a new directory each time they install a new gem.

Jim

···


Jim Menard, jimm@io.com, http://www.io.com/~jimm/
“Anyone else picturing Wallace sitting in front of a Rube Goldburgesque
workstation, accidentally booting up Netscape and crying out, ‘It’s the
wrong browser, Grommit!’ ?” – Jim Evans in rec.humor.oracle.d

Jim Menard jimm@io.com writes:

I’m switching over to using RubyGems. I like it!

When I removed the “normal” Rake install and typed “gem --remote-install
rake”, it succeeded with the message “Successfully installed rake version
0.3.1”.

It took me a while to find the “rake” executable, though. It used to go in
/usr/local/bin/rake, but it looks like it is now in
/usr/local/lib/ruby/gems/1.9/rake-0.3.1/lib/rake.
^^^
oops: bin

···

Do all executables installed by gems go in the gem directory instead of
/usr/local? If so, I would like to suggest that gems put their executables in
/usr/local/ instead, so that users don’t have to modify their paths by adding
a new directory each time they install a new gem.


Jim Menard, jimm@io.com, http://www.io.com/~jimm/
“The world is divided into one group: those who start counting at 0,
and those who don’t.” – Unknown

Or symlinks. Then, when uninstalling, look for symlinks pointing to
files that re being uninstalled.

But this might cause a problem with having multiple versions installed.
Which rake executable do you want installed? hmmm…

–Mark

···

On Mar 24, 2004, at 2:19 PM, Jim Menard wrote:

Do all executables installed by gems go in the gem directory instead of
/usr/local? If so, I would like to suggest that gems put their
executables in
/usr/local/ instead, so that users don’t have to modify their paths by
adding
a new directory each time they install a new gem.

Jim Menard said:

I’m switching over to using RubyGems. I like it!

When I removed the “normal” Rake install and typed “gem --remote-install
rake”, it succeeded with the message “Successfully installed rake version
0.3.1”.

It took me a while to find the “rake” executable, though. It used to go in
/usr/local/bin/rake, but it looks like it is now in
/usr/local/lib/ruby/gems/1.9/rake-0.3.1/lib/rake.

Do all executables installed by gems go in the gem directory instead of
/usr/local? If so, I would like to suggest that gems put their executables
in
/usr/local/ instead, so that users don’t have to modify their paths by
adding
a new directory each time they install a new gem.

The GEMS team is debating how to handle applications at the moment.
Multiple versions of libraries are handled fine by manipulating the Ruby
load path, but that doesn’t work for commands that use PATH. There are
several trade-offs to be made and we need it to work cross platform.
Peruse the archives of the RubyGem developers mailing list if you are
interested in details.

Until the teams resolves that issue, there is a manual install step for
rake. Details of that manual step are spelled out at
http://rake.rubyforge.org/ under the section “GEM Installation”.
Basically you need to run the gem_install_bin.rb script to copy the rake
script to an appropriate bin directory.

That’s all.

···


– Jim Weirich jim@weirichhouse.org http://onestepback.org

“Beware of bugs in the above code; I have only proved it correct,
not tried it.” – Donald Knuth (in a memo to Peter van Emde Boas)

Jim Menard wrote:

Jim Menard jimm@io.com writes:

I’m switching over to using RubyGems. I like it!

When I removed the “normal” Rake install and typed “gem --remote-install
rake”, it succeeded with the message “Successfully installed rake version
0.3.1”.

It took me a while to find the “rake” executable, though. It used to go in
/usr/local/bin/rake, but it looks like it is now in
/usr/local/lib/ruby/gems/1.9/rake-0.3.1/lib/rake.

                                      ^^^
                               oops:  bin

Do all executables installed by gems go in the gem directory instead of
/usr/local? If so, I would like to suggest that gems put their executables in
/usr/local/ instead, so that users don’t have to modify their paths by adding
a new directory each time they install a new gem.

Warning: The following comments have a 50% chance of being wrong. :slight_smile:

My understanding is that gems currently are good for libs, not
necessarily for apps.

Also I think that a large part of what gems are about is versioning –
e.g., you might want to keep multiple versions of Foo around.

However, I agree with you about making it as usable as possible.

What’s the answer? Chad, Gavin, others?

Hal

Hal Fulton wrote:

Warning: The following comments have a 50% chance of being wrong. :slight_smile:

My understanding is that gems currently are good for libs, not
necessarily for apps.

Also I think that a large part of what gems are about is versioning –
e.g., you might want to keep multiple versions of Foo around.

However, I agree with you about making it as usable as possible.

What’s the answer? Chad, Gavin, others?

Ask the user when he or she installs a gem?

Can a gem author tell the final gem that it is carrying an app, not (or
maybe along with) a lib , and if so, ask the end user how and where to
install it (e.g., in the gems lib dir, with a symlink from the default
bin dir; gems dir with no symlink; directly in the default bin dir; some
place else the user defines)?

James

We are working through these issues. The gem developer will be able to
identify executable scripts (aka applications). The current idea is
the gems framework will, upon install, generate a file in the standard
place that /bin apps are placed right now (/usr/local/bin, etc) which
will be a wrapper to the original app (located in the /bin/app,
and will first do a require_gem ‘’ then load the app file.
Chad is looking at this, I have my hands full trying to figure out
building source gems (C extensions).

Best,

Rich

···

On Mar 24, 2004, at 9:04 PM, James Britt wrote:

Hal Fulton wrote:

Warning: The following comments have a 50% chance of being wrong. :slight_smile:
My understanding is that gems currently are good for libs, not
necessarily for apps.
Also I think that a large part of what gems are about is versioning –
e.g., you might want to keep multiple versions of Foo around.
However, I agree with you about making it as usable as possible.
What’s the answer? Chad, Gavin, others?

Ask the user when he or she installs a gem?

Can a gem author tell the final gem that it is carrying an app, not
(or maybe along with) a lib , and if so, ask the end user how and
where to install it (e.g., in the gems lib dir, with a symlink from
the default bin dir; gems dir with no symlink; directly in the default
bin dir; some place else the user defines)?

James