RVM and Subversion hooks

Trying to set up the post-commit hook of Subversion in combination with certain Ruby version (gems and so on) controlled by RVM, I’ve ended up with this file (post-commit):


# Load RVM
. /home/user/.rvm/scripts/rvm

# Execute script previous
rvm use whatever-ruby-version-you-have && /path/to/your/script.rb 1>/dev/null

Pay attention to the shebang (bash instead of sh), and the way of loading RVM (. /home/user/.rvm/scripts/rvm). This way RVM command can be invoked as usual 🙂

About Ibon

Me encanta salir a darme paseos, patinar, esquiar y jugar a baloncesto (alguna pachanga que otra en Larrabetzu los miércoles).

Creo en los principios que fundamentan el Software Libre, y me parece una gran herramienta para conseguir una sociedad mas justa.

This entry was posted in Software, Software Libre, Solucioname esto..., Subversion and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *