Skip to content

Commit

Permalink
return requires. Not sure why Windows can't access bundled gems.
Browse files Browse the repository at this point in the history
  • Loading branch information
anyaelena committed Mar 10, 2020
1 parent 434747c commit 08d8eb2
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions bin/openstudio_meta
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

Signal.trap('INT') {abort}
require 'logger'

$logger = ::Logger.new(STDOUT)
$logger.level = ::Logger::WARN
ENV['GEM_HOME'] = File.absolute_path(File.join(__FILE__, './../../gems/'))
Expand Down Expand Up @@ -775,14 +776,14 @@ class RunAnalysis
def execute(sub_argv)
$logger.debug "sub_argv = #{sub_argv} in RunAnalysis execute"
$logger.debug "Environment is: #{::ENV.inspect}"
# $logger.debug 'Requiring gems for RunAnalysis'
# $logger.debug 'Requiring os-analysis gem'
# require 'openstudio-analysis'
# $logger.debug 'Requiring zip gem'
# require 'zip'
# $logger.debug 'Requiring os-aws gem'
# require 'openstudio-aws'
# $logger.debug 'Successfully required all gems for RunAnalysis'
$logger.debug 'Requiring gems for RunAnalysis'
$logger.debug 'Requiring zip gem'
require 'zip'
$logger.debug 'Requiring os-analysis gem'
require 'openstudio-analysis'
$logger.debug 'Requiring os-aws gem'
require 'openstudio-aws'
$logger.debug 'Successfully required all gems for RunAnalysis'
options = {
debug: false,
dencity: false,
Expand Down Expand Up @@ -1079,14 +1080,6 @@ require 'timeout'
$logger.debug 'Requiring json'
require 'json'
$logger.debug 'Required initial gems successfully'
$logger.debug 'Requiring gems for RunAnalysis'
$logger.debug 'Requiring os-analysis gem'
require 'openstudio-analysis'
$logger.debug 'Requiring zip gem'
require 'zip'
$logger.debug 'Requiring os-aws gem'
require 'openstudio-aws'
$logger.debug 'Successfully required all gems for RunAnalysis'

# Execute the CLI interface, and exit with the proper error code
$logger.info "Executing argv: #{$argv}"
Expand Down

0 comments on commit 08d8eb2

Please sign in to comment.