Last Updated: February 25, 2016
·
742
· 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.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

Most application security programs still stop at the repository. The page a visitor loads can run third-party scripts that read the DOM, change a checkout, or steal a session after the deploy already looks clean.

Security insights from Cside