From 0dfd4779785f27ae98c089e579681087444dc839 Mon Sep 17 00:00:00 2001 From: Ivan Povalyukhin Date: Wed, 25 Mar 2015 19:23:46 -0700 Subject: [PATCH] fix path to commands installed by gem install --user-install --- plugins/available/ruby.plugin.bash | 8 +++++++- template/bash_profile.template.bash | 6 ++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/available/ruby.plugin.bash b/plugins/available/ruby.plugin.bash index f36bb153..b320cb30 100644 --- a/plugins/available/ruby.plugin.bash +++ b/plugins/available/ruby.plugin.bash @@ -1,5 +1,11 @@ cite about-plugin -about-plugin 'adds "remove_gem" function' +about-plugin 'ruby and rubygems specific functions and settings' + +# Make commands installed with 'gem install --user-install' available +# ~/.gem/ruby/${RUBY_VERSION}/bin/ +if which ruby >/dev/null && which gem >/dev/null; then + PATH="$PATH:$(ruby -e 'print Gem.user_dir')/bin"; +fi function remove_gem { about 'removes installed gem' diff --git a/template/bash_profile.template.bash b/template/bash_profile.template.bash index be218ee1..077e0668 100755 --- a/template/bash_profile.template.bash +++ b/template/bash_profile.template.bash @@ -3,8 +3,10 @@ # Load RVM, if you are using it [[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm -# Add rvm gems and nginx to the path -export PATH=$PATH:~/.gem/ruby/1.8/bin:/opt/nginx/sbin +# Add nginx to the path +PATH=$PATH:/opt/nginx/sbin + +export PATH # Path to the bash it configuration export BASH_IT=$HOME/.bash_it