rails/rails — pull request #3946 by pokonski (2011-12-12 15:43:05+00:00)
Title: Fix #3365. Default config.relative_url_root to ENV["RAILS_RELATIVE_URL_ROOT"].

This pull request fixes generation of asset paths inside assets when deploying to sub-URI.
For example when our app is deployed inside `/community` this

```css
body{
background: url(<%= image_path "bg.png" %>);
}
```

Now produces a proper path:

```css
body{
background: url(/community/assets/bg.png);
}
```

instead of `/assets/bg.png`.

## Precompilation:
Also works!

```bash
RAILS_RELATIVE_URL_ROOT="/community" bundle exec rake assets:precompile
```