I need to connect to remote server from local SU (Pro 2018) to fetch some data required for my scripts.
( I can do that from local Excel to that remote MYSQL database, so
- server
- database name
- user
- password
works fine, it should not be an issue)
I try to follow Dan’s recommendation.
Step (2) works fine, result from SketchUp Ruby Console is:
Gem::install "ruby-mysql"
[#<Gem::Specification:0xdb94cf16e0 ruby-mysql-2.9.14>]
Step (3) works fine, result from SketchUp Ruby Console is:
Gem::install "dbi"
[#<Gem::Specification:0xdb953c578c dbi-0.4.5>]
I fail to succed with step (4), result from SketchUp Ruby Console is:
Gem::install "ruby-odbc"
Error: #<Gem::InstallError: The 'ruby-odbc' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
>
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/defaults/operating_system.rb:12:in `rescue in block in <top (required)>'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/defaults/operating_system.rb:4:in `block in <top (required)>'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/installer.rb:275:in `call'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/installer.rb:275:in `block in run_pre_install_hooks'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/installer.rb:274:in `each'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/installer.rb:274:in `run_pre_install_hooks'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/installer.rb:235:in `install'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/request_set.rb:166:in `block in install'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/request_set.rb:150:in `each'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/request_set.rb:150:in `install'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems/dependency_installer.rb:394:in `install'
C:/Program Files/SketchUp/SketchUp 2018/Tools/RubyStdLib/rubygems.rb:558:in `install'
Then I’ve tried to download ODBC binding for Ruby from
https://rubygems.org/gems/ruby-odbc
as suggested in step (4)
The name of the downloaded file is: “ruby-odbc-0.99999.gem”
I have placed it into “C:\Program Files\SketchUp\SketchUp 2018\Tools\RubyStdLib\rubygems”
( I suspect this is perhaps not the right thing to do with the downloaded file,
since I could not find any other file there with extension name “.gem”)
Still no success, the same error message comes up.
Obviously, I missed some point.
( I skiped step (1) since I try to access remote server where MYSQL is installed, also, I did not download the gems suggested in step 2, and 3.,
since those steps worked without downloading the mentioned files.
Also, I did not dowload DevKit, since I try to install the suggested precompiled gems)
( My Sketchup Pro 2018 version 18.0.16975 64-bit and sketchup-ruby version is 2.2.4 )
Could someone please help?