Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I check all the gems with its versions in my Rails project?

When I go with gem list from my app folder, the terminal displays the list of all gems installed on my local machine. I want instead to see the project related gems.

like image 828
Alex Shmatko Avatar asked Sep 09 '15 07:09

Alex Shmatko


People also ask

How do I check my gem version?

To check if a specific version is installed, just add --version , e.g.: gem list -i compass --version 0.12.

How do I see all Rails versions?

To find out what the most recent Rails version is, use the command gem search rails | grep "^rails " .

Which is the command used to list all the gems available in Ruby?

The Gem command is included with Ruby 1.9+ now, and is a standard addition to Ruby pre-1.9. Because local_gems relies on group_by , it returns a hash of the gems, where the key is the gem's name, and the value is an array of the gem specifications.

How do I check Ruby on Rails version?

Step 1: Check Ruby Version Open the command prompt and type ruby -v. If Ruby responds, and if it shows a version number at or above 2.2. 2, then type gem --version. If you don't get an error, skip Install Ruby step.


2 Answers

Use

bundle list to show project related gems

To see some gems version, you can chain comands and use grep

exp.

bundle list | grep rails will list all gems that containt word rails, such as rails, jquery-rails, ...

like image 154
Nermin Avatar answered Oct 05 '22 13:10

Nermin


bundle show is what you are looking for

like image 20
Tim Kretschmer Avatar answered Oct 05 '22 14:10

Tim Kretschmer