Ruby LOAD PATHs script for Win32

58 views
Skip to first unread message

Dan Rathbun

unread,
Jul 6, 2010, 9:21:04 PM7/6/10
to Google SketchUp Developers - SketchUp Ruby API
Here's a more flexible version (for Win32 only):

# begin '!loadpaths.rb'
# for win32
#
# version 2.0.0 by Dan Rathbun
#
begin
#
ver='1.8.6'
#
pre='C:/ruby/lib/ruby'
#
plat=RUBY_PLATFORM
#
# add the standard lib path
$LOAD_PATH << "#{pre}/#{ver}"
# add the standard platform sub lib path
$LOAD_PATH << "#{pre}/#{ver}/#{plat}"
#
# optionally add paths to vendor_ruby libs
# only apply if there are things installed there
#$LOAD_PATH << "#{pre}/vendor_ruby/#{ver}"
#$LOAD_PATH << "#{pre}/vendor_ruby/#{ver}/#{plat}"
#
# optionally add paths to site_ruby libs
# only apply if there are things installed there
#$LOAD_PATH << "#{pre}/site_ruby/#{ver}"
#$LOAD_PATH << "#{pre}/site_ruby/#{ver}/#{plat}"
#
$LOAD_PATH.uniq!
#
# print LOAD PATHS to console
# (May not print during Sketchup startup!)
Sketchup.send_action('showRubyPanel:')
UI.start_timer(1,false) {
puts "\nLOAD PATHS:\n"
$LOAD_PATH.each {|x| puts "#{x}\n"}
puts "\n\n"
}
#
end
# cleanup
ver=nil
pre=nil
plat=nil
GC.start
#
# end of '!loadpaths.rb'

Dan Rathbun

unread,
Aug 6, 2010, 10:48:07 AM8/6/10
to Google SketchUp Developers - SketchUp Ruby API
I have updated this script to ver 3.0.1

Get newest version here:
[code] Ruby LOAD PATHs script for (Win32)
http://www.sketchucation.com/forums/viewtopic.php?f=180&t=29412
Reply all
Reply to author
Forward
0 new messages