Skip to content

Commit

Permalink
Add explicit rbenv support via 'rbenv:load'. See #5, #39.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz committed Aug 7, 2012
1 parent 10a7aef commit c4d7ffc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions lib/mina/rbenv.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Common usage:
#
# task :environment do
# invoke :'rbenv:load'
# end
#
# task :deploy => :environment do
# ...
# end
#
set_default :rbenv_path, "$HOME/.rbenv"

task :'rbenv:load' do
queue %{
echo "-----> Loading rbenv"
#{echo_cmd %{export PATH="#{rbenv_path}/bin:$PATH"}}
# Ensure that rbenv is loaded.
if ! which -s rbenv >/dev/null; then
echo "! rbenv not found"
echo "! If rbenv is installed, check your 'rbenv_path' setting"
fi
#{echo_cmd %{eval "$(rbenv init -)"}}
}
end

0 comments on commit c4d7ffc

Please sign in to comment.