I remember encountering difficulties with this as well. I could only get Rack to run from the command line from within the parent directory. I am linking another post I made showing how I get around this using a bash alias. If you need more guidance, I would be happy to help.
Edit: Sorry. I seem to have replied to the wrong person (not OP). Unsure how to change that.