From: Yvon Thoraval Date: 2008-02-03T05:21:25+09:00 Subject: Ruby 1.9.0-0 RubyGems and environment variables ??? ------=_Part_1113_26695989.1201983685366 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline I do have installed install rb-appscript from svn (revision 436) successfully for : ruby 1.8.6 (2007-03-13 patchlevel 0) [powerpc-darwin8.9.0] and ruby 1.9.0 (2007-12-25 revision 14709) [powerpc-darwin8.11.0] this version of rb-appscript has been tested from the developper itself, it is well working on his computer with ruby 1.9. but not on mine :[ notice that with the ruby 1.9 install i've added the suffix 19 (hence ruby19, gem19 etc) and both are lying under /opt/local. the simple script test : ---------------------------------------------------------------------- #! /usr/bin/env ruby19 #require "rubygems" require "appscript" include Appscript p app('Finder').home.folders.get ---------------------------------------------------------------------- resulting in : ---------------------------------------------------------------------- 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 `
' ---------------------------------------------------------------------- i suspect my environment variables are wrong for ruby19 : export RUBYOPT=rubygems export GEM_HOME=/opt/local/lib/ruby/gems/1.8 export RUBYLIB=/opt/local/lib/ruby/:/opt/local/lib/ruby/site_ruby/1.8:/opt/local/lib/ruby/site_ruby/1.9.0 export RUBYGEMS=/opt/local/lib/ruby/site_ruby/1.8 is there somewhere a README to understand how ruby 1.9 (versus 1.8 ?) load the libs ??? best, -- yvon ------=_Part_1113_26695989.1201983685366 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I do have installed install rb-appscript from svn (revision 436) successfully for :

ruby 1.8.6 (2007-03-13 patchlevel 0) [powerpc-darwin8.9.0]

and

ruby 1.9.0 (2007-12-25 revision 14709) [powerpc-darwin8.11.0] 

this version of rb-appscript has been tested from the developper itself, it is well working on his computer with ruby 1.9.

but not on mine :[


notice that with the ruby 1.9 install i've added the suffix 19 (hence ruby19, gem19 etc) and both are lying under /opt/local.


 
the simple script test :

----------------------------------------------------------------------
#! /usr/bin/env ruby19

#require "rubygems"
require "appscript"
include Appscript

p app('Finder').home.folders.get

----------------------------------------------------------------------

resulting in :

----------------------------------------------------------------------
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 `<class:PositionSpecifier>'
  from /opt/local/lib/ruby/site_ruby/1.8/_aem/aemreference.rb:193:in `<module:AEMReference>'
  from /opt/local/lib/ruby/site_ruby/1.8/_aem/aemreference.rb:44:in `<top (required)>'
  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 `<top (required)>'
  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 `<module:AEM>'
  from /opt/local/lib/ruby/site_ruby/1.8/aem.rb:10:in `<top (required)>'
  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 `<module:Appscript>'
  from /opt/local/lib/ruby/site_ruby/1.8/appscript.rb:7:in `<top (required)>'
  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 `<main>'

----------------------------------------------------------------------

i suspect my environment variables are wrong for ruby19 :

export RUBYOPT=rubygems
export GEM_HOME=/opt/local/lib/ruby/gems/1.8
export RUBYLIB=/opt/local/lib/ruby/:/opt/local/lib/ruby/site_ruby/1.8:/opt/local/lib/ruby/site_ruby/1.9.0
export RUBYGEMS=/opt/local/lib/ruby/site_ruby/1.8

 
is there somewhere a README to understand how ruby 1.9 (versus 1.8 ?) load the libs ???

best,
--
yvon
------=_Part_1113_26695989.1201983685366--