Module: GemHelpers

Defined in:
lib/gem_helpers.rb

Class Method Summary collapse

Class Method Details

.install(gem, install_dir) ⇒ Object

TODO once the cross platform gem install is working as expected copy over to other projects



14
15
16
17
18
19
20
21
# File 'lib/gem_helpers.rb', line 14

def self.install(gem, install_dir)
  begin
    `gem install #{gem} --no-rdoc --no-ri -i #{install_dir}`
  rescue => e
  end
  #fork { exec("gem install #{gem} --no-rdoc --no-ri -i #{install_dir}") }
  #Process.wait2
end

.update_gem_path(path) ⇒ Object



6
7
8
9
10
# File 'lib/gem_helpers.rb', line 6

def self.update_gem_path(path)
  Gem.clear_paths
  ENV['GEM_HOME'] = File.expand_path(path)
  ENV['GEM_PATH'] = File.expand_path(path)
end