Favor project binstubs instead of using
bundle exec PROGRAM. Binstubs will ensure
bundler/setup is required before executing the program instead of running
Instead of generating stubs for all dependencies in your project with
bundle install --binstubs,
you can use
bundle binstub [GEMS...] to generate only stubs of gems you know
you will use, and delete any extra files that you won’t be using:
$ bundle binstub rspec-core capistrano # Capistrano 3 ships with 'capify', but we only need `bin/cap`. $ rm bin/capify # We can now use 'bin/cap' or 'bin/rspec'.
Important: Rails 4.0+ already ships with binstubs for the
executables so you don’t need to generate them by yourself.
For more explanations around binstubs, please see thes rbenv Wiki’s page on binstubs.
gem 'rails', '4.2.6' gem 'faraday', '~> 0.9.1'
gem 'rails', '4.2.6' # Assets gem 'jquery-rails', '~> 4.1' gem 'sass-rails', '~> 5.0.3' gem 'turbolinks', '5.0.0.beta2' # Application gem 'pg', '~> 0.18.2' gem 'devise', '~> 3.5.3' gem 'simple_form', '~> 3.0.0'
You can omit the group title comments.
Watch for gem updates regularly to avoid having to update multiple gems at once. You can run
bundle outdated once a week and attempt to update gems that have recent releases and prevent having a largely outdated app.
Make one commit per gem updated so you avoid big changes all at once. It helps investigating possible breaks or bugs on your project. It’s also easier to revert a commit that revolves around one goal and rollback the update.
bundle update sprockets && bin/rake test # Tests are green and everything seems to be working? shipit git add Gemfile.lock && git commit -m 'Update sprockets dependency.'