Install gems for all bundled projects
This is a bash script for those of you who need to install all gems for all projects (e.g. to get started quickly on a newly installed system).
Put it into your ~/bin/
and run it from the directory that holds your projects.
Note that, like the vanilla bundle install
, this will fail whenever a new gem compiles native components and requires a missing system dependency.
Related cards:
Bundler: Install gems behind a proxy
To install gems Bundler needs to be able to talk to https://api.rubygems.org
.
If you are behind a proxy you can use the https_proxy
environment variable:
https_proxy=http://myproxy:123 bundle install
Note that if there is no `https_...
When upgrading/downgrading RubyGems and Bundler on a server, you must clear bundled gems
On application servers, gems are usually bundled into the project directory, at a location shared across deployments.
This is usually shared/bundle
inside your project's root directory, e.g. /var/www/your-project/shared/bundle/
.
If you can't ...
How to install bundler for Ruby < 2.3
Bundler 2 requires at least Ruby 2.3.0 and RubyGems 2.5.0. You might get the following error when you try to install bundler
for Ruby < 2.3:
ERROR: Error installing bundler:
bundler requires Ruby version >= 2.3.0.
To fix this error u...
Bundler for Rails 2.3.x
Update RubyGems and Passenger
Bundler requires Rubygems >= 1.3.6. Run gem update --system
if you have an older version.
It also is not compatible with older versions of passenger, so bring that up to date ...
Bundler: Gemfile.lock is corrupt & gems are missing from the DEPENDENCIES section
So you're getting this failure when running bundle install
on an older project:
Your Gemfile.lock is corrupt. The following gems are missing from the DEPENDENCIES section: 'archive-tar-minitar' 'hoe' 'rcov'
This happens when you ar...
Bundler in deploy mode shares gems between patch-level Ruby versions
A recent patch level Ruby update caused troubles to some of us as applications started to complain about incompatible gem versions. I'll try to explain how the...
How to update a single gem conservatively
The problem
Calling bundle update GEMNAME
will update a lot more gems than you think. E.g. when you do this:
bundle update cucumber-rails
... you might think this will only update cucumber-rails
. But it actually **updates cucumber...
Shell script to clean up a project directory
Call geordi clean
from a project root to remove unused and unnecessary files inside it.
This script is part of our geordi gem on github. In Geordi > 1.2 you can call geordi clean
.
Choosing the right gems for your project
Adding a gem means you take over the liability towards the external code.
Checklist
Based on "To gem, or not to gem":
- Gem is really needed (prefer writing your own code for simple requir...
Missing certificates for rubygems and bundler in Ruby 1.8.7
Using Ruby 1.8.7 you will not be able to use the maximum versions Rubygems 1.8.30 and Bundler 1.17.3 with https://rubygems.org/
anymore. This is a result of a server certificate on December 5th, 2020. The resulting errors will...