Thanks for the feedback Tim,
You're right, it does verify that calendar_date_select.js is present
in the public/ directory. The problem for me is that I have
configured action controller under production environments to look to
AWS as the asset host, not the public directory. I have also
excluded the public/javascripts, public/stylesheets, public/images
directories from SCM, so when I push to heroku calendar_date_select.js
will never show up, automatically triggering the installation of local
assets (and throwing the exception).
It is kind of an ugly hack, but I suppose I could allow public/
javascripts/calendar_date_select/calendar_date_select.js to be under
SCM so that it is pushed with each remote commitment and just never
reference it under the production environment, thereby suppressing the
copy action. All of my javascript_include_tag, stylesheet_link_tag,
and image_* would all point to AWS and the local copy of
calendar_date_select.js would be "invisible".
My thoughts where to add a getter and setter method to the
CalendarDateSelect module that would allow for configuration under
remote asset stores. Maybe the setter would accept a simple boolean?
The code that copies the asset locally could be wrapped in a
conditional statement that checks to see if RAILS_ENV is set to
"production" and that the getter method returns true. This might be
flexible enough to allow development under localhost using the local
assets and then the option to use local or remote asset stores in
production. Your thoughts?
I wonder if industry best practices will fully endorse remote asset
stores over local ones, in which case problems like this one may
become more prevalent.
- Mike
P.S. Thanks for commenting in your source and great project by the
way.
On Oct 2, 7:53 am, Tim Harper <
timchar...@gmail.com> wrote:
> I'm pretty sure that if the
> public/calendar_date_select/calendar_date_select.js file exists, it won't
> try and install the assets (so you should commit it to your source control).
> May need to double check to see if blank.html follows the same rule.
>