This project is archived and is in readonly mode.

#5914 ✓resolved
Neeraj Singh

If there is an uri then provide better error message while combining javascripts into one

Reported by Neeraj Singh | November 3rd, 2010 @ 02:52 PM | in 3.x

- j = []
- j << 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.js'
- j << 'vendor/rails'
- j << 'application'
= javascript_include_tag j, :cache => 'all'

Above code will work fine in development mode and it will fail only in production mode.

It will work fine in development mode because if it is uri then absolute path is not calculated. However it fails in production mode with following error message which does not provide any clue in terms of what went wrong.

"can't convert nil into String"

Attached is a patch with test.

After the patch the error message would be:

Asset file https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.js is uri and cannot be merged into single file

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Tags

Referenced by

Pages