public
Rubygem
Description: Apache Buildr
Homepage: http://incubator.apache.org/buildr
Clone URL: git://github.com/vic/buildr.git
Search Repo:
Fixed rake setup to run correctly on JRuby 1.1.1


git-svn-id: https://svn.apache.org/repos/asf/incubator/buildr/trunk@653599 
13f79535-47bb-0310-9956-ffa450edef68
vic (author)
Mon May 05 14:00:41 -0700 2008
commit  b8c1221892a07d72d9fac5752c72bc6251071694
tree    7499f8cc576c4e4d76a4d54779e165226b4dbe5f
parent  805d3faa609259986f3bf18cd513e5d3b972e645
...
17
18
19
 
20
21
22
23
24
25
...
38
39
40
 
41
42
43
44
45
 
46
47
48
...
17
18
19
20
21
 
22
23
24
25
...
38
39
40
41
42
43
44
45
 
46
47
48
49
0
@@ -17,8 +17,8 @@
0
 
0
 
0
 require 'rubygems/source_info_cache'
0
+require 'stringio' # for Gem::RemoteFetcher
0
 
0
-
0
 def windows?
0
   Config::CONFIG['host_os'] =~ /windows|cygwin|bccwin|cygwin|djgpp|mingw|mswin|wince/i
0
 end
0
0
@@ -38,11 +38,12 @@
0
 
0
 def install_gem(name, ver_requirement = nil)
0
   dep = Gem::Dependency.new(name, ver_requirement)
0
+ rb_bin = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
0
   if Gem::SourceIndex.from_installed_gems.search(dep).empty?
0
     spec = Gem::SourceInfoCache.search(dep).last
0
     fail "#{dep} not found in local or remote repository!" unless spec
0
     puts "Installing #{spec} ..."
0
- args = [Config::CONFIG['ruby_install_name'], '-S', 'gem', 'install', spec.name, '-v', spec.version.to_s]
0
+ args = [rb_bin, '-S', 'gem', 'install', spec.name, '-v', spec.version.to_s]
0
     args.unshift('sudo', 'env', 'JAVA_HOME=' + ENV['JAVA_HOME']) unless windows?
0
     sh *args
0
   end

Comments

    No one has commented yet.