Prior to Rails 3, the task of the railsscript was simply to create a new RoR application that you do: create a new Rails application in the directory script/server.
You want to run ruby script/serverto invoke the script server using the Ruby interpreter.
In Rails 3, a railsscript is also responsible for calling other scripts in your application: ruby script/serverbecome rails server, ruby script/generatebecome rails generate, etc.