supports rails' relative_url when building baseUrl for requirejs

Should baseUrl for requirejs honours rails relative_url_root?

In our project we've set Rails.application.config.relative_url_root so that asset_path generates a path sits under the relative_url_root. This was a workaround for us to use requirejs-rails gem with our setup.