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.
Written by Benjamin Curtis
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#