# We need to require application after the server sets environment,
# otherwise the --environment option given to the server won't propagate.
requireAPP_PATH
Dir.chdir(Rails.application.root)
server.start
}
end
```
This file will change into the root of the directory (a path two directories back from `APP_PATH` which points at `config/application.rb`), but only if the `config.ru` file isn't found. This then requires `rails/commands/server` which sets up the `Rails::Server` class.