SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
39 stars 10 forks source link

Gems - --user-install option #32

Open MSP-Greg opened 6 years ago

MSP-Greg commented 6 years ago

Using SU 2017 & Windows, gems can be installed to Gem.user_dir. Due to the fact that ENV['GEM_PATH'] is incorrect, they can not be used.

The following code will allow their use:

ENV['GEM_PATH'] = "#{Gem.user_dir}#{File::PATH_SEPARATOR}#{Gem.dir}"
Gem.paths = {'GEM_PATH' => "#{Gem.user_dir}#{File::PATH_SEPARATOR}#{Gem.dir}" }

I could list several reasons why I think this would be helpful, and I can't think any reason for not making this change. If there are any, I'd be happy to discuss further.

Thanks, Greg

thomthom commented 6 years ago

Logged as SU-38588

MSP-Greg commented 6 years ago

I've got a patch that can be used, adds 'defaults' directory to rubygems, then a file named ruby.rb. RubyInstaller builds use operating_system.rb.