Hey I just uploaded my whole project folder and all it does is show a dir listing of all my files and exposing my code

I'm basicially a beginner to this, and it works fine on my localhost server, but how do I get it to run on a server that has ruby/rails installed?

Thanks a bunch