1

Trying to configure PATH variables for CLI measure testing

I am currently trying to set up the command line interface for for measure testing. I modified the PATH variable to point to the OpenStudio version of ruby to use.

I also tried putting a .rb file in the site_ruby file Path and overall I am getting an error of "Cannot load such file" -- openstudio.so (LoadError).

I am using OpenStudio version 2.5.1, and have the latest install of ruby 2.4

ruby files are executable from the directory with a hello-world that I tested, so I am not sure why it cannot load the openstudio.so file or that its not finding it. They are in the same directory.

UPDATE: downgraded my Ruby to 2.2.4 to see if that would fix the issue, no luck. Still getting an error "LoadError: cannot load such file -- openstudio.so"

ParticleSwarm's avatar
389
ParticleSwarm
asked 2018-06-26 08:31:31 -0500
MatthewSteen's avatar
10.1k
MatthewSteen
updated 2018-06-26 09:34:39 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Update I needed the X64 bit of the Ruby install!

ParticleSwarm's avatar ParticleSwarm (2018-06-27 09:33:29 -0500) edit
add a comment see more comments

1 Answer

3

Try following the directions here.

mdahlhausen's avatar
9.5k
mdahlhausen
answered 2018-06-26 11:21:47 -0500
edit flag offensive 0 remove flag delete link

Comments

Thank you! this is a new source I have not seen before. I completed all of the steps however when trying to install the gem bundler, and the json. both returned:

ERROR: Could not find a valid gem 'json' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

ParticleSwarm's avatar ParticleSwarm (2018-06-26 11:31:49 -0500) edit

Make sure you have the correct ssl certificates installed: https://guides.rubygems.org/ssl-certi...

In particular this section: https://bundler.io/v1.16/guides/rubyg...

Also, I don't think you need bundler just for the CLI, though you may need it if you want to use 'openstudio-standards'. Try require 'openstudio' in ruby after you've set your path environment variable.

mdahlhausen's avatar mdahlhausen (2018-06-26 19:32:35 -0500) edit

thank you for your help, After setting the new path to the new installation of ruby, with the openstudio.rb included in the site_ruby and the correct reference of openstudio-2.5.1 when I require 'openstudio' it is still telling me that it cannot load the .so file.

the Error being thrown appears to be coming from the kernel_require.rb file in ruby on line 54.

ParticleSwarm's avatar ParticleSwarm (2018-06-27 08:00:07 -0500) edit

what operating system are you using

mdahlhausen's avatar mdahlhausen (2018-06-27 10:37:13 -0500) edit

I am running windows 10, the solution to the problem was that I did not have the 64 bit version of ruby to match the 64 bit Open Studio.

Thanks again for the support!

ParticleSwarm's avatar ParticleSwarm (2018-06-27 10:41:19 -0500) edit
add a comment see more comments