[Rubygems-developers] [ rubygems-Bugs-27366 ] gem env command doesn't display ~/.gem as a gem path

Adam Salter adam.q.salter at gmail.com
Fri Oct 30 17:37:49 EDT 2009


I've had a lot of trouble with this on Ruby1.9 (.1p243 Mac OS 10.6)

My solution was to use a bash script:

export BIN_PATH=$PATH
# find current version
v=`ruby -e 'puts RUBY_VERSION'`
if [ $v == "1.9.1" ];then
   export PATH=$BIN_PATH:~/Library/bin:$HOME/.gem/ruby/1.9.1/bin
   export GEM_HOME=/opt/local/lib/ruby1.9/gems/1.9.1
   export GEM_PATH=$GEM_HOME:/Users/adam/.gem/ruby/1.9.1
else
   export PATH=$BIN_PATH:~/Library/bin:$HOME/.gem/ruby/1.8/bin
fi

Not ideal obviously.

-Adam

On 29/10/2009, at 4:51 AM, <noreply at rubyforge.org>  <noreply at rubyforge.org 
 > wrote:

> Bugs item #27366, was opened at 2009-10-28 09:24
> You can respond by visiting:
> http://rubyforge.org/tracker/?func=detail&atid=575&aid=27366&group_id=126
>
> Category: `gem` commands (other)
> Group: None
> Status: Open
> Resolution: None
> Priority: 3
> Submitted By: Roger Pack (rogerdpack)
> Assigned to: Nobody (None)
> Summary: gem env command doesn't display ~/.gem as a gem path
>
> Initial Comment:
> Currently gem treats ~/.gem as a gem path, however running gem env  
> doesn't hint at that fact.
>
> rdp at li49-39:~/dev/downloads/rubygems-1.3.5$ gem env
> RubyGems Environment:
>  - RUBYGEMS VERSION: 1.3.5
>  - RUBY VERSION: 1.8.6 (2009-3-4 patchlevel 287) [i686-linux]
>  - INSTALLATION DIRECTORY: /home/rdp/dev/downloads/rubygems-1.3.5
>  - RUBY EXECUTABLE: /usr/local/bin/ruby
>  - EXECUTABLE DIRECTORY: /home/rdp/dev/downloads/rubygems-1.3.5/bin
>  - RUBYGEMS PLATFORMS:
>    - ruby
>    - x86-linux
>  - GEM PATHS:
>     - /home/rdp/dev/downloads/rubygems-1.3.5
>  - GEM CONFIGURATION:
>      ...
>
> Thanks!
> -r
>
> ----------------------------------------------------------------------
>
>> Comment By: Daniel Berger (djberg96)
> Date: 2009-10-28 10:51
>
> Message:
> Hm, mine did on Snow Leopard:
>
> RubyGems Environment:
>  - RUBYGEMS VERSION: 1.3.5
>  - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0]
>  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
>  - RUBY EXECUTABLE: /usr/local/bin/ruby
>  - EXECUTABLE DIRECTORY: /usr/local/bin
>  - RUBYGEMS PLATFORMS:
>    - ruby
>    - x86-darwin-10
>  - GEM PATHS:
>     - /usr/local/lib/ruby/gems/1.8
>     - /Users/dberger/.gem/ruby/1.8
> ...
>
> Interestingly, when I run "gem env gempath" it only shows my .gem  
> path, while "gem env gemdir" only shows the /usr/local/lib path.  
> Intentional? Not sure.
>
> Not sure what to make of this yet.
>
> Regards,
>
> Dan
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> http://rubyforge.org/tracker/?func=detail&atid=575&aid=27366&group_id=126
> _______________________________________________
> Rubygems-developers mailing list
> http://rubyforge.org/projects/rubygems
> Rubygems-developers at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubygems-developers



More information about the Rubygems-developers mailing list