Reputation: 13004
How do I use ruby gems in google-sketchup?
Whenever I try typing:
> require 'rubygems'
into the ruby console, I get the following:
Error: #<LoadError: (eval):7:in `require': no such file to load -- rubygems>
EDIT
I am on OSX.
Upvotes: 1
Views: 1496
Reputation: 11
need ruby1.8.6, and add some paths to $LOAD_PATH before require rubygems:
$LOAD_PATH << "C:/Ruby186/lib/ruby/1.8"
$LOAD_PATH << "C:/Ruby186/lib/ruby/site_ruby/1.8"
$LOAD_PATH << "C:/Ruby186/lib/ruby/1.8/i386-mingw32"
$LOAD_PATH.uniq!
# print LOAD PATHS to console
Sketchup.send_action('showRubyPanel:')
UI.start_timer(1,false) {
puts "\nLOAD PATHS:\n"
$LOAD_PATH.each {|x| puts "#{x}\n"}
puts "\n\n"
}
require 'rubygems' #=> true
edit C:\Ruby186\lib\ruby\site_ruby\1.8\rubygems.rb remove line 12
#require 'thread' # HACK: remove me for 1.5 - this is here just for rails
Upvotes: 1
Reputation: 1568
sorry this is not an answer, i just thought i could shed some more light... (i dont have enough rep points to comment yet)
typing RUBY_VERSION in the SketchUp Ruby Console returns 1.8.5?
i have several ruby versions on my mac but certainly not 1.8.5.
using sketchup 8.0.4810
Upvotes: 1