From: David Masover Date: 2008-05-28T19:24:31+09:00 Subject: Re: ruby-opengl gem uses ruby1.9, even from gem1.8 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 3c6,11 < # This file was generated by RubyGems. --- > # Permission is hereby granted, free of charge, to any person obtaining a copy > # of this software and associated documentation files (the "Software"), to > # deal in the Software without restriction, including without limitation the > # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or > # sell copies of the Software, and to permit persons to whom the Software is > # furnished to do so, subject to the following conditions: 5,6c13,14 < # The application 'rake' is installed as part of a gem, and < # this file is here to facilitate running it. --- > # The above copyright notice and this permission notice shall be included in > # all copies or substantial portions of the Software. 7a16,23 > # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS > # IN THE SOFTWARE. > #++ 9,15c25,29 < require 'rubygems' < < version = ">= 0" < < if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then < version = $1 < ARGV.shift --- > begin > require 'rake' > rescue LoadError > require 'rubygems' > require 'rake' 17,19c31 < < gem 'rake', version < load 'rake' --- > Rake.application.run