[Rubygems-developers] Can anyone shed a little light on executable gems for me?

michael greenly mgreenly at gmail.com
Sat Dec 29 12:16:12 EST 2007

I don't really have a problem installing it in different directories and in
fact that's exactly what I have at the moment (it's the only option)

I describe my current setup in this blog post:

The one minor shortcoming of this arrangement is that the user has to know
where things are installed and use the full paths when they want to execute
a specific gem.  So for example you'd have to type /opt/ruby/1.9/bin/rails
to run that specific version.  It works but it's not a clean solution.

I was mostly only asking trying to get a bit of historical perspective on
recent changes? If there was one?  I intend on spending some time learning
just what makes gems tick and then taking a real hard look at how it's being
re-packaged on Debian based systems.

I'd really like to see gems eventually support everything that's necessary
for all platforms as configurable installation options.  Obviously if that
were the case re-packaging would be much more straight forward.

All of that said, I'm an outsider looking in at both processes.  I have no
clue what's really going on with RubyGems or with Debian's Ruby packaging
but I'm just starting to pay attention because it's just starting to really
matter to me.

On Dec 28, 2007 11:02 PM, Stephen Bannasch <stephen.bannasch at deanbrook.org>

> >It seems to me that something has changed quite a bit about how
> executable gems are handled in the last few versions?
> >
> >In the past there was a $GEM_HOME/bin directory but it doesn't seem to be
> there any more?  Instead it seems the executable files for installed gems
> end up in the same place that the gem command exits?  Is this right?  Or am
> I off base on this?
> >
> >The reason I ask is I'm left wondering how best to separate a Ruby 1.8environment from a Ruby
> 1.9 environment so that they can each have a for example a 'rails' gem
> installed and work in both environments at the same time but with separate
> gems?
> Michael,
> I install ruby 1.9 into a whole different directory and the gems also live
> there. If I am writing code for 1.9
> This is how it works on my MacOS X 10.4.11 system.
> My source for Ruby 1.9 lives here:
>  ~/dev/ruby/src/ruby_1_9
> The Ruby 1.9 install lives here:
>  ~/dev/ruby/1.9_trunk
> I build the source using these configure parameters:
> ./configure --prefix=/Users/stephen/dev/ruby/1.9_trunk/ --enable-pthread
> --with-readline-dir=/usr/local --enable-shared
> [I've already got an up-to-date copy of readline built and installed in
> /usr/local]
> Following this with make; make install creates my ruby 1.9 installation
> here ~/dev/ruby/1.9_trunk.
> I set my path accordingly by executing this after I cd into
> ~/dev/ruby/1.9_trunk:
>  export PATH=`pwd`/bin:$PATH
> I've now got a pristine new ruby 1.9 environment there. Gems installed
> there won't conflict at all with the Ruby 1.8.6 p111 I have installed in
> /usr/local. I do something very similar for my JRuby installs.
> [~/dev/ruby/1.9_trunk]$ ruby --version
> ruby 1.9.0 (2007-12-29 revision 0) [i686-darwin8.11.1]
> [~/dev/ruby/1.9_trunk]$ gem environment
> RubyGems Environment:
>  - RUBYGEMS VERSION: 1.0.1 (1.0.1)
>  - RUBY VERSION: 1.9.0 (2007-12-29 patchlevel 0) [i686-darwin8.11.1]
> /Users/stephen/dev/ruby/1.9_trunk/lib/ruby/gems/1.9.0
>  - RUBYGEMS PREFIX: /Users/stephen/dev/ruby/1.9_trunk/lib/ruby
>  - RUBY EXECUTABLE: /Users/stephen/dev/ruby/1.9_trunk/bin/ruby
>    - ruby
>    - x86-darwin-8
>     - /Users/stephen/dev/ruby/1.9_trunk/lib/ruby/gems/1.9.0
>     - :update_sources => true
>     - :verbose => true
>     - :benchmark => false
>     - :backtrace => false
>     - :bulk_threshold => 1000
>     - "rdoc" => "--template jamis --inline-source --line-numbers"
>     - http://gems.rubyforge.org
> [~/dev/ruby/1.9_trunk]$ gem list --local
> *** LOCAL GEMS ***
> _______________________________________________
> Rubygems-developers mailing list
> Rubygems-developers at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubygems-developers

Michael Greenly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20071229/e963592e/attachment-0001.html 

More information about the Rubygems-developers mailing list