We've had a lot of troubles with bower-rails (wrong asset versions installed on production) and after doing a lot of research, one of our frontend guys explained us what might be wrong with our setup.
I'm using install_before_precompile setting to install all my assets before precompilation on production servers. While in most cases it works as it should, for some reason bower install does not checks (resolution) versions of packages installed. It means that if i have a resolution 'angular', '1.3.16' line - when i do run bower:install, change version number to 2.0 and run bower:install again, bower does not checks what version is installed, it just checks if it's installed at all and does nothing if it is. So the package is not getting updated to 2.0, it's still 1.3.16.
That's why i think it would be a good idea to replace install_before_precompile with update_before_precompile (or map that config to update instead of install) because bower update takes care of resolution changes and also, if there was no bower install triggered before, it runs it.
However, i'm not a bower specialist nor even a big javascript user so i might be wrong all the way and the issue is somewhere else.
We've had a lot of troubles with bower-rails (wrong asset versions installed on production) and after doing a lot of research, one of our frontend guys explained us what might be wrong with our setup.
I'm using
install_before_precompile
setting to install all my assets before precompilation on production servers. While in most cases it works as it should, for some reasonbower install
does not checks (resolution) versions of packages installed. It means that if i have aresolution 'angular', '1.3.16'
line - when i do runbower:install
, change version number to2.0
and runbower:install
again, bower does not checks what version is installed, it just checks if it's installed at all and does nothing if it is. So the package is not getting updated to 2.0, it's still 1.3.16.That's why i think it would be a good idea to replace
install_before_precompile
withupdate_before_precompile
(or map that config toupdate
instead ofinstall
) becausebower update
takes care of resolution changes and also, if there was nobower install
triggered before, it runs it.However, i'm not a bower specialist nor even a big javascript user so i might be wrong all the way and the issue is somewhere else.
Thanks!