A recent release of Bouldr threw a bit of a spanner in the works when the excellent Asset Packager began choking when attempting to create our concatenated and compressed javascript file.

It turns out that as I am developing in Windows (gah!), I need to run dos2unix in order to ensure that the js files are in the appropriate file format (our server is running CentOS). In order to automate this process, I added the following to our deploy script:

# Need to ensure files are in UNIX format for the asset packager to run correctly
run "cd #{release_path}/public/javascripts && find . -name '*.js' -exec dos2unix '{}' \\;"

# Run the asset packager to create the production javascript and css files
run "cd #{release_path} && rake asset:packager:build_all RAILS_ENV=production"

One Comment

  1. THanks, u saved me hours! I already started to debug asset packager… :)


Post a Comment

*
*