Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
unix function to open app/boot rails
function ss {
if [ "$1" ]; then
# cd to the rails app directory.
cd ~/Sites; # (update the repository root location to suit your needs)
if [ "$1" ]; then
mate $1
cd `ls|grep $1|sort|tail -1`
fi
echo $(pwd)
fi
# kill any existing rails server processes.
ps -a|grep "ruby ./script/server"|grep -v "grep"|cut -d " " -f1|xargs -n 1 ki$
# start the server.
ruby ./script/server
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.