One answer to this problem is compile within your development environment, commit the files to source control, and deploy them along with the rest of the code.
There is one major issue with this approach; these files will be served by the development web server instead of the requests being handled dynamically by Rails & Sprockets. That stops changes to the underlying assets showing on the front-end.
This is very simple to fix.
In development.rb place the following line:
config.assets.prefix = "/dev-assets"
This over-rides whatever is set in application.rb (normally "/assets").
You will also need this in application.rb:
config.assets.initialize_on_precompile = false
You will also need this in application.rb:
config.assets.initialize_on_precompile = false
That stops the task trying to connect to your database. (Beware if you are referring to ActiveRecord models in your assets, as this won't work).
These changes allow you to compile and commit the assets to your repository locally, and have those files in your working development tree, but for development requests to still be sent to Sprockets. Plus, you only have to precompile and commit when something has actually changed.
NB: You will need to make sure any Javascript and CSS compressors you use are available on your local machine. And you will need to change the deploy task to NOT precompile assets or create an 'assets' symlink.