This'll work if you installed the rails 4 gem and call `rails` in a Rails 4 app.

Consider a Rails 3 app, though: we'll try to load the app directly, but using a possibly-wrong Ruby version and an already-activated Rails 4 gem.