s91nbg
Last Updated: February 25, 2016
·
414
· stympy

Find the locked version of Rails in all your projects

Let's say you have all your Rails projects living in ~/Code, and you want to check what version of Rails they are all using because, you know, it's good to be up-to-date and stuff. :) Run this one-liner to check it out:

find ~/Code -name Gemfile.lock | grep -v 'vendor/gems' | xargs egrep '^    rails \('

I always bundle my gems in vendor/gems, thus the grep -v to ignore dependencies on rails in the gems my projects are using. If you don't bundle there, you can drop that grep.