'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?
Solution 1:[1]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
