From: unbewusst.sein@... (=?ISO-8859-1?Q?Une_B=E9v?= =?ISO-8859-1?Q?ue?=) Date: 2008-02-01T16:49:56+09:00 Subject: RubyGems and ENV vars ??? I'm working (on Mac OS X) with two installed ruby (apart from Apple default one): $ which ruby /opt/local/bin/ruby $ which ruby19 /opt/local/bin/ruby19 (all of the Ruby-1.9.0-0 bins have a "19" suffix) when i try a simple script as : ---------------------------------------------------------------------- #! /usr/bin/env ruby19 require "appscript" include Appscript p app('Finder').home.folders.get ---------------------------------------------------------------------- i get the following : ---------------------------------------------------------------------- RubyMate r6354 running Ruby r1.9.0 (/opt/local/bin/ruby19) >>> desktop.rb /opt/local/lib/ruby/site_ruby/1.8/_aem/aemreference.rb:15:in `new' : Not a four-char-code string. ( ArgumentError ) from /opt/local/lib/ruby/site_ruby/1.8/_aem/aemreference.rb:15:in `pack_enum' from /opt/local/lib/ruby/site_ruby/1.8/_aem/aemreference.rb:204:in `' from /opt/local/lib/ruby/site_ruby/1.8/_aem/aemreference.rb:193:in `' from /opt/local/lib/ruby/site_ruby/1.8/_aem/aemreference.rb:44:in `' from /opt/local/lib/ruby/site_ruby/1.8/_aem/codecs.rb:8:in `require' from /opt/local/lib/ruby/site_ruby/1.8/_aem/codecs.rb:8:in `' from /opt/local/lib/ruby/site_ruby/1.8/aem.rb:14:in `require' from /opt/local/lib/ruby/site_ruby/1.8/aem.rb:14:in `' from /opt/local/lib/ruby/site_ruby/1.8/aem.rb:10:in `' from /opt/local/lib/ruby/site_ruby/1.8/appscript.rb:13:in `require' from /opt/local/lib/ruby/site_ruby/1.8/appscript.rb:13:in `' from /opt/local/lib/ruby/site_ruby/1.8/appscript.rb:7:in `' from /Users/yt/work/Ruby19/rb-appscript/Finder/desktop.rb:4:in `require' from /Users/yt/work/Ruby19/rb-appscript/Finder/desktop.rb:4:in `
' ---------------------------------------------------------------------- then, ruby19 is looking into "/opt/local/lib/ruby/site_ruby/1.8" i think this is due to my environment variables for Rubygems : $ echo $RUBYOPT rubygems $ echo $GEM_HOME /opt/local/lib/ruby/gems/1.8 $ echo $RUBYLIB /opt/local/lib/ruby/:/opt/local/lib/ruby/site_ruby/1.8 $ echo $RUBYGEMS /opt/local/lib/ruby/site_ruby/1.8 is there a way to setup those environment variables to get ruby and ruby19 working with gems without switching an environment variable ? -- Une B�vue