Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between local and remote gems?

When I tried to install the mysql2 gem (using "sudo gem install mysql2"), I was surprised not to find the gem listed in my "gem list".

After some googling I found out that the mysql2 gem was installed in my remote gems (look them up using "gem query --remote" or with "gem search mysql2 -r") and than I installed them from remote to local using "gem install --remote mysql2".

Now the mysql2 is listed in my gem list.

I am glad I found the solution, however, I don't really understand why the gem installed in remote gems in the first place or what the difference is. Googling did not return a good explanation.

Can someone please explain the difference to me?

like image 874
Peter-Jan Celis Avatar asked Feb 03 '12 00:02

Peter-Jan Celis


1 Answers

Remote gems are really just those on the RubyForge or Github servers. Why it wouldn't install is beyond me, but know that there is no such thing as a remote gem, just gems installed on your machine and gems that you can download from a remote server.

like image 194
Linuxios Avatar answered Oct 15 '22 02:10

Linuxios