TL;DR — Resumo Rápido
Guia completo para gerenciar gems Ruby: instale, atualize e remova gems com o comando gem. Resolva conflitos de versões, configure fontes e use Bundler para dependências de projeto.
Nota: Este artigo foi publicado originalmente em 2014. Alguns passos, comandos ou versões de software podem ter mudado. Consulte a documentação atual de Linux para as informações mais recentes.
How to: Install, Update and Remove RubyGems
I just had a brief experience installing a (https://rubygems.org “RubyGems”) so I thought I would share a little bit of what I learned about managing RubyGems. Similar to packages (apt-get) you can search through them, install them, remove them, and update them with simple commands. Below is a brief summary designed just to quickly point individuals to the instructions needed to accomplish the management of RubyGems:
- Searching (where mysql is the the search term: it will find any gem that contains the word mysql. The address after —remote indicates the online library where the search will be performed)
- gem search mysql —remote gems.rubyforge.org
- Installing (where mysql is the gem you are installing and —include-dependencies indicates an automatic answer to yes when it asks to install a needed dependency)
- sudo gem install mysql
- sudo gem install mysql —include-dependencies
- Updating (you may update all gems or specify a particular one like mysql)
- sudogem update
- sudo gem update mysql
- Removing (where mysql is the gem you wish to uninstall)
- sudo gem uninstal l mysql
- Clean / Removes old versions (I still struggle to understand the difference with update)
- sudo gem clean
- List installed Gems
- gem list
Resumo
Artigos Relacionados
- How to: Add a preconfigured setting to the guest account on Ubuntu
- Resolved: fatal: Unable to find remote helper for ‘git+http’ when using npm install
- [What is: ](/wasted-memory-zend-opcache-memcached/)