Skip to content

Instantly share code, notes, and snippets.

@sfate
Forked from indirect/rc.sh
Created July 11, 2012 15:09
Show Gist options
  • Save sfate/3091024 to your computer and use it in GitHub Desktop.
Save sfate/3091024 to your computer and use it in GitHub Desktop.
rails console alias for both 2 and 3
# Rails 2 and Rails 3 console
function rc {
if [ -e "./config/environment.rb" ]; then
irb -Iconfig -renvironment
else
echo -e "\e[1;31m Error: \e[0mNo rails environment was founded! \n"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment