You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a bit of trouble precompiling my assets on Windows 10. rake assets:precompile works fine in development and test, but rake assets:precompile RAILS_ENV=production always fails:
There's tons of issues visible from Google that detail people encountering this issue when running any number of node.js programs (Medium/phantomjs#19, browserify/watchify#83, npm/npm#10826), and it usually has to do with other processes locking the files (anti-virus, IDES, etc). I disabled all these, restarted, ran npm cache clean, and deleted my app's tmp folder. No dice.
Since this only occurs in production, I hoped to narrow down the issue. Even after replacing config/environments/production with a copy of config/environments/development this still occurs. I scanned my app for other configuration differences that might occur and found none. I scanned this app for other configuration differences and found this in the railtie:
As I expected, setting config.browserify_rails.use_browserifyinc = true in config/environments/production.rb fixed this issue. In fact, I can then remove this line and the command still works until I delete the tmp folder, at which point it reappears.
I know this repo isn't the place for browserify support, and Windows issues are annoying, but I thought the difference behavior between the two programs might help someone more familiar with these tools point me in the right direction. Does anyone know why switching config.browserify_rails.use_browserifyinc fixes this issue, and what I might do to fix it in a more permanent way?
That is odd. The good news is using browserifyinc in production shouldn't cause any problems. It is just disabled because it's mostly to make rebuilds faster and in production it's usually a fresh build each time and browserifyinc is slightly slower for the initial build. Or can be.
Hi all,
Thanks for this awesome gem.
I'm having a bit of trouble precompiling my assets on Windows 10.
rake assets:precompile
works fine in development and test, butrake assets:precompile RAILS_ENV=production
always fails:There's tons of issues visible from Google that detail people encountering this issue when running any number of node.js programs (Medium/phantomjs#19, browserify/watchify#83, npm/npm#10826), and it usually has to do with other processes locking the files (anti-virus, IDES, etc). I disabled all these, restarted, ran
npm cache clean
, and deleted my app'stmp
folder. No dice.Since this only occurs in production, I hoped to narrow down the issue. Even after replacing
config/environments/production
with a copy ofconfig/environments/development
this still occurs. I scanned my app for other configuration differences that might occur and found none. I scanned this app for other configuration differences and found this in the railtie:As I expected, setting
config.browserify_rails.use_browserifyinc = true
inconfig/environments/production.rb
fixed this issue. In fact, I can then remove this line and the command still works until I delete thetmp
folder, at which point it reappears.I know this repo isn't the place for
browserify
support, and Windows issues are annoying, but I thought the difference behavior between the two programs might help someone more familiar with these tools point me in the right direction. Does anyone know why switchingconfig.browserify_rails.use_browserifyinc
fixes this issue, and what I might do to fix it in a more permanent way?browserify-rails (4.1.0)
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
package.json:
The text was updated successfully, but these errors were encountered: