I renamed the js file to have the .erb extention. Rails will render it correctly, and we now get access to the ENV variables.