The Blog
Nov 30
1
A Better Way to Avoid a Project Named Server
Yesterday I posted about how I avoided creating the annoying rails server projects when accidently running rails server under a rails 2 application. I wanted to follow up with a much more concise script that accomplishes the same ends through different means. Using this script requires no changes to how you start the development server and, even cooler perhaps, allows you to start the rails 2 server as if you were in a rails 3 project. Shout out goes to Intern Mike for the assist.
rails () { if [ -e script/server ]; then script/"$@" else command rails "$@" fi}






Comments
[...] Update: I have posted a better solution! [...]