plewas
plewas

Reputation: 248

How to check gems ready to update?

Ho to check gems ready to update, without update them?

Upvotes: 15

Views: 6407

Answers (4)

Stefan Kanev
Stefan Kanev

Reputation: 3040

Bundler has an outdated command. Similar to gem outdated command but that will apply only to your project instead of the whole system.

Example:

$ bundle outdated
Fetching gem metadata from https://rubygems.org/............
Resolving dependencies...

Gem            Current  Latest  Requested  Groups
just-the-docs  0.7.0    0.10.0  ~> 0.7.0   default
liquid         4.0.4    5.5.1

--strict options allows to only list newer versions allowed by your Gemfile requirements.

Upvotes: 10

Pafjo
Pafjo

Reputation: 5019

If you are not using bundler, just run gem outdated and it will give you a list of outdated gems.

Example of output:

$ gem outdated                                                                                                                                                                                   
acts_as_tree (2.7.1 < 2.9.1)                                                                                                                                                                     
addressable (2.4.0 < 2.7.0)                                                                                                                                                                      
bcrypt (3.1.12 < 3.1.13)                                                                                                                                                                         
bootsnap (1.4.5 < 1.4.6)                                                                                                                                                                         
bootstrap (4.3.1 < 4.4.1)                                                                                                                                                                        
brakeman (4.7.2 < 4.8.0)                                                                                                                                                                         
cancancan (1.17.0 < 3.0.2)                                                                                                                                                                       
chart_js (1.1.0 < 1.1.1)                                                                                                                                                                         
coffee-rails (4.2.2 < 5.0.0)
combustion (0.6.0 < 1.1.2)
database_cleaner (1.8.2 < 1.8.3)
...

Upvotes: 27

xander-miller
xander-miller

Reputation: 529

gem outdated will give you a list of outdated gems including version number you currently have and the latest version number.

Then to update:

  • gem update GEMNAME to update a specific gem or just
  • gem update to update all gems to the latest stable version

Upvotes: 2

Ram Ratan Maurya
Ram Ratan Maurya

Reputation: 119

It's pretty easy, just type the following code:

$ gem update GEMNAME

Upvotes: 1

Related Questions