From: Eric Hodel Date: 2008-05-29T04:17:31+09:00 Subject: Re: ruby-opengl gem uses ruby1.9, even from gem1.8 On May 28, 2008, at 03:24 AM, David Masover wrote: > On Wednesday 28 May 2008 03:55:32 Eric Hodel wrote: >> On May 28, 2008, at 01:14 AM, David Masover wrote: >>> This is on an Ubuntu Hardy system, on x86_64. Both Ruby 1.8 and 1.9 >>> are installed. >>> >>> I was tracking down the lack of ruby.h, which surprised me, as >>> ruby1.8-dev is installed. Scrolling up even further, though, and >>> something just >>> seems wrong about these three lines: >>> >>> rake RUBYARCHDIR=/var/lib/gems/1.8/gems/ruby-opengl-0.60.0/lib >>> RUBYLIBDIR=/var/lib/gems/1.8/gems/ruby-opengl-0.60.0/lib extension >>> /usr/bin/ruby1.9 mkrf_conf.rb >>> (in /var/lib/gems/1.8/gems/ruby-opengl-0.60.0) >>> >>> Why is ruby1.9 being used to run mkrf_conf.rb? I am using a 1.8 gem >>> -- as you >>> can see, it's trying to install in a 1.8 path, and: >>> >>> $ head -1 `which gem` >>> #! /usr/bin/ruby1.8 >>> $ head -1 `which gem1.9` >>> #!/usr/bin/ruby1.9 >> >> head -1 `which rake` > > Ah. Thanks: > > $ head -1 `which rake` > #!/usr/bin/ruby1.9 > > After installing rake via gem1.8, I still get the same on rake and > rake1.9 -- > but they are not the same file: > > $ diff /usr/bin/rake /usr/bin/rake1.9 > 1a2,4 >> >> #-- >> # Copyright (c) 2003, 2004, 2005, 2006, 2007 Jim Weirich They should have a different shebang line. Re-run `gem install rake` again to make plain `rake` be the 1.8 one. You may want to add "install: --format-executable" to your ~/.gemrc to make gem add 1.8 or 1.9 to gem executable names so that they don't step on each others' toes.