Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show outdated gems?

Tags:

ruby

bundler

gem

To avoid crashing anything I specify the version number for every gem in my Gemfile:

gem 'sass-rails',   '~> 3.1.5'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '~> 1.0.3'
gem 'haml-rails', "~> 0.3.4"
gem 'simple_form', '~> 1.5.2'

But I want to, at least, know if there are some newer version I haven’t installed. For instance, simple_form 2.0.0 has been released.

I can check each gem on RubyGems, but there must be a automatic tool to do this chore, right?

like image 747
Lai Yu-Hsuan Avatar asked Apr 09 '12 12:04

Lai Yu-Hsuan


2 Answers

With the latest version (1.1) of bundler you can do bundle outdated (see this page.)

To update bundler to the latest version you can run gem update bundler

gazler@gazler-laptop:~/development/rails/livestax$ bundle outdated
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..

Outdated gems included in the bundle:
  * multi_json (1.2.0 > 1.0.3)
  * activesupport (3.2.3 > 3.1.0)
  * activemodel (3.2.3 > 3.1.0)
  * rack (1.4.1 > 1.3.5)
  * rack-cache (1.2 > 1.0.3)
  * sprockets (2.4.0 > 2.0.3)
  * actionpack (3.2.3 > 3.1.0)
  * mime-types (1.18 > 1.17.2)

There is also the Gemnasium but I have never used it.

like image 129
Gazler Avatar answered Oct 07 '22 01:10

Gazler


bundle outdated will do the job. But that's not automated. If you want to automate the process you should use VersionEye. VersionEye can monitor your Gemfile on GitHub or Bitbucket and notifies you about out-dated dependencies in your project via email.

By the way. I'm the dude who started VersionEye.

like image 45
Robert Reiz Avatar answered Oct 07 '22 02:10

Robert Reiz