jwhitley / requirejs-rails

RequireJS support for your Rails 3 or 4 application
MIT License
592 stars 202 forks source link

Added fix for rails 5 precompile (sprockets-rails 3) #269

Open thegillis opened 8 years ago

thegillis commented 8 years ago

As described in issue #268, requirejs-rails broke during our production assets:precompile. Our working environment was:

Unfortunately when we did a major upgrade to the following:

And the asset precompile failed.

It mainly seems to be several small removed deprecated functions. Sprockets logical paths seem to contain the biggest changes.

To get both our old environment and new environment to build, we needed this change.

One of the biggest missing pieces to this commit is bower js support. This is mainly because we don't use it. I'm open to suggestions with what to use.

https://github.com/MediaFactual/requirejs-rails/blob/rails5/lib/tasks/requirejs-rails_tasks.rake#L138

Note that this might also solve Issue #257 . We have also been looking forward to https://github.com/jwhitley/requirejs-rails/pull/193 since this also breaks a lot of our production asset precompile js files.