From 5b751ae0b3f6c10a1053e4a2e04fd92d228d787f Mon Sep 17 00:00:00 2001 From: Zack Hobson Date: Wed, 11 Mar 2009 17:53:21 -0700 Subject: [PATCH] Execute the appropriate gem command when using JRuby [#2215 state:resolved] Signed-off-by: Pratik Naik --- railties/lib/rails/gem_dependency.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/railties/lib/rails/gem_dependency.rb b/railties/lib/rails/gem_dependency.rb index 2dd659032f..ea36f69f2f 100644 --- a/railties/lib/rails/gem_dependency.rb +++ b/railties/lib/rails/gem_dependency.rb @@ -236,7 +236,14 @@ module Rails private def gem_command - RUBY_PLATFORM =~ /win32/ ? 'gem.bat' : 'gem' + case RUBY_PLATFORM + when /win32/ + 'gem.bat' + when /java/ + 'jruby -S gem' + else + 'gem' + end end def install_command