Make rails_app more flexible