the12
the12

Reputation: 2415

In Ruby, what are local gems?

What does it mean when Ruby refers to gems as being local? i.e.: when you type in the root of your app directory, gem list, the result is:

*** LOCAL GEMS ***

actioncable (5.0.1, 5.0.0.1, 5.0.0)
actionmailer (5.0.1, 5.0.0.1, 5.0.0)
...

What does this have to do with Rails?

Upvotes: 1

Views: 976

Answers (2)

notapatch
notapatch

Reputation: 7173

Gems in gem list can either be local gems, on your machine, or remote gems, on the remote server, typically https://rubygems.org/. So one way of thinking about the command is the list does not have remote gems.

Gems on your machine, and local is the default.

$ gem list --local


*** LOCAL GEMS ***

actioncable (6.1.4.1)

Remote gems is a much longer list found on the "remote" domain. The remote domain 'source' can be found in gem env or gem sources and commonly is https://rubygems.org.

$ gem list --remote 

*** REMOTE GEMS ***

- (1)
-A (0.0.0)
.cat (0.0.1)
.omghi (2)
01xinan-metasploit-framework (6.0.17)
0mq (0.5.3)

gem list can also list both see gem list --help

Upvotes: 1

Eric Duminil
Eric Duminil

Reputation: 54223

Those would be gems installed on your computer. As opposed to the ones that are available from rubygems.org.

It's not specific to Rails, and can refer to any Ruby gem.

Upvotes: 2

Related Questions