I would not recommend loading rails through aptitude, I would use RubyGems . Then just run gem install railsand transfer the specific version if necessary.
The thing is, aptitude is trying to serve you with Rails 2.3 when Rails is currently on version 3.2. The command you controlled rails new testis the rails 3 version. In Rails 2, it will be script/rails ...something.
In particular, you can try:
$ sudo apt-get remove rails
$ gem install rails
source
share