no Ruby script found in input (LoadError)

I just cloned a new Raills 3 project from git. The project is brand new, although it does have some gem dependancies. I ran bundle install and I got the dependancies in stalled. Bundle check confirmed everything is there. But when I just the rails command (rails -v for example) I get this:

/Users/joBdsgh/.rvm/rubies/ruby-1.9.2-preview3/bin/ruby: no Ruby script found in input (LoadError)

This does not happen in any other directory except for the project directory and any of its subdirectories. I created a dummy rails 3 project and I did not have this problem.

Any idea on what's causing this error.


There are various possibilities that could be causing your problem.

I see you are using RVM. Since you are saying that this particular error doesn’t occur in any other directory, it leads me to thinking that perhaps the project has a .rvmrc file within its root directory and it’s setting up rvm for this directory differently as you normally have. So my first suggestion would be to look for that file and see if that is the case. Also when in the project directory, do try and do a gem list | grep rails and ensure that it does confirm that rails is installed.

If that doesn’t help you, perhaps you should try and give us more details, perhaps the complete stack trace.