In the root of a rails 3 app:
$ rails
env: ruby1.9: No such file or directory
$ script/rails
env: ruby1.9: No such file or directory
$ script/rails generate
env: ruby1.9: No such file or directory
$ ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.2.0]
$ mate script/rails
#!/usr/bin/env ruby1.9 --> #!/usr/bin/env ruby