Ruby Stones on Google Sketchup

How to use ruby ​​stones in google-sketchup?

Whenever I try to enter:

> require 'rubygems'

in the ruby ​​console, I get the following:

Error: #<LoadError: (eval):7:in `require': no such file to load -- rubygems>

EDIT

I'm on OSX.

+1
source share
2 answers

Sorry, this is not an answer, I just thought I could shed some light ... (I do not have enough comments to comment)

type RUBY_VERSION in Ruby Console SketchUp will return 1.8.5?

I have several versions of ruby ​​on my mac, but of course not 1.8.5.

using sketch 8.0.4810

+1
source

need ruby1.8.6 and add some paths to $ LOAD_PATH before requiring 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 delete line 12

#require 'thread' # HACK: remove me for 1.5 - this is here just for rails
+1
source

Source: https://habr.com/ru/post/1791809/


All Articles