Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myabc/73552 to your computer and use it in GitHub Desktop.
Save myabc/73552 to your computer and use it in GitHub Desktop.
From 2d940fb0f5a5df64cde100c5fb026b1c1e9ce1d7 Mon Sep 17 00:00:00 2001
From: Alex Coles <alex@alexcolesportfolio.com>
Date: Tue, 3 Mar 2009 22:57:03 +0100
Subject: [PATCH] Ensure rake install command uses same Ruby interpreter/implementation
Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
---
Rakefile | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Rakefile b/Rakefile
index 195896e..a379ec8 100755
--- a/Rakefile
+++ b/Rakefile
@@ -104,9 +104,13 @@ task :doc do
end
end
+def sudo_gem(cmd)
+ sh "#{SUDO} #{RUBY} -S gem #{cmd}", :verbose => false
+end
+
desc "Install #{GEM_NAME}"
task :install => :package do
- sh %{#{SUDO} gem install --local pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
+ sudo_gem %{install --local pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
end
if WINDOWS
--
1.6.1.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment