If I download a .gem file to a folder in my computer, can I install it later using gem install?
If I download a .gem file to a folder in my computer, can I install it later using gem install?
Also, you can use gem install --local path_to_gem/filename.gem
This will skip the usual gem repository scan that happens when you leave off --local.
You can find other magic with gem install --help.
Yup, when you do gem install, it will search the current directory first, so if your .gem file is there, it will pick it up. I found it on the gem reference, which you may find handy as well:
gem install will install the named gem. It will attempt a local installation (i.e. a .gem file in the current directory), and if that fails, it will attempt to download and install the most recent version of the gem you want.
Well, it's this my DRY installation:
[Ruby Installation version]/lib/ruby/gems/[Ruby version]/cache)*.gems files" to a computer without gems in own gem cache place (by default the same patron path of first step: [Ruby Installation version]/lib/ruby/gems/[Ruby version]/cache)[Ruby Installation version]/lib/ruby/gems/[Ruby version]/cache) and fire the gem install anygemwithdependencieshere (by example cucumber-2.99.0)It's DRY because after install any gem, by default rubygems put the gem file in the cache gem directory and not make sense duplicate thats files, it's more easy if you want both computer has the same versions (or bloqued by paranoic security rules :v)
Edit: In some versions of ruby or rubygems, it don't work and fire alerts or error, you can put gems in other place but not get DRY, other alternative is using launch integrated command
gem serverand add the localhost url in gem sources, more information in: https://guides.rubygems.org/run-your-own-gem-server/
You can download gems from https://rubygems.org/gems/ or build you local gem via bundle and rack.
eg:
Take care of installing dependencies before installing actual gems.
Note: If using fluentd td-agent and ruby on same machine. Please make sure to use td-agent's td-agent-gem command. td-agent has own Ruby.