0

I am currently using RVM for managing different gemsets for different versions of Ruby. RVM has made changes where the RVM folders must be listed first or else I have to manually set the gemset each time.

I also plan to use postgres.app for my PostgreSQL database instead of using the installation from Apple. It also requires its override to be first in PATH. This is because when I source .bashrc it automatically places the path for the server app before anything else. I'm using the server app for DNS setup and hosting one website (for now).

Here are my statements in .bashrc:

export PATH="$PATH:$HOME/.rvm/bin"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
PATH="$PATH:$HOME:/.rvm/rubies/ruby-2.2.0/bin/ruby:/Applications/Postgres.app/Contents/Versions/9.4/bin:/usr/bin/psql"

Here is the output for echo $PATH:

/Users/username/.rvm/gems/ruby-2.2.0@gemsetname/bin:/Users/username/.rvm/gems/ruby-2.2.0@global/bin:/Users/username/.rvm/rubies/ruby-2.2.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/Users/username/.rvm/bin:/Users/username/.rvm/bin:/Users/username:/.rvm/rubies/ruby-2.2.0/bin/ruby:/Applications/Postgres.app/Contents/Versions/9.4/bin:/usr/bin/psql

My bash knowledge is limited. I'm not sure if RVM is adding these folders or if it is something with the server app. I already have my database created using postgres.app. I want to know if there is a way to override the server app folders or at least get my folder for postgres.app to list first in PATH.

System info: Mavericks 10.9.5, Server app 3.2.2, RVM version 1.26.10

You must log in to answer this question.

Browse other questions tagged .