Permalink
Browse files

Fixes issue with JRuby

  • Loading branch information...
1 parent eb17976 commit 732bf7003ddeedf1e844ab08f97a741784de44d7 @wycats wycats committed Sep 20, 2008
Showing with 7 additions and 4 deletions.
  1. +1 −1 Rakefile
  2. +6 −3 lib/minigems.rb
View
@@ -70,7 +70,7 @@ end
desc "Install the gem"
task :install => [:clean, :package] do
- sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-wrapper --no-update-sources --no-rdoc --no-ri}
+ sh %{#{sudo} #{Gem.ruby} -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-wrapper --no-update-sources --no-rdoc --no-ri}
end
namespace :jruby do
View
@@ -176,9 +176,12 @@ def self.default_path
@default_path ||= if defined? RUBY_FRAMEWORK_VERSION then
File.join File.dirname(RbConfig::CONFIG["sitedir"]), 'Gems',
RbConfig::CONFIG["ruby_version"]
- elsif defined? RUBY_ENGINE then
- File.join RbConfig::CONFIG["libdir"], RUBY_ENGINE, 'gems',
- RbConfig::CONFIG["ruby_version"]
+ elsif defined?(RUBY_ENGINE) && File.directory?(
+ File.join(RbConfig::CONFIG["libdir"], RUBY_ENGINE, 'gems',
+ RbConfig::CONFIG["ruby_version"])
+ )
+ File.join RbConfig::CONFIG["libdir"], RUBY_ENGINE, 'gems',
+ RbConfig::CONFIG["ruby_version"]
else
File.join RbConfig::CONFIG["libdir"], 'ruby', 'gems',
RbConfig::CONFIG["ruby_version"]

0 comments on commit 732bf70

Please sign in to comment.