Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#5914
- 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

Reported by Neeraj Singh · November 3rd, 2010 @ 02:52 PM

State: resolved
Milestone: 3.x
Assigned to: José Valim José Valim
Importance: Low