Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Best Practice: Use Gemfile and bundler
We do and you should too.
If you are installing gems with
sudo, you should stop. See Best Practice: Never install gems with sudo for alternative and the dangers of
sudo gem install.
What is bundler?
Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. 
source 'https://rubygems.org' gem 'run_loop', '>= 1.5.5', '< 2.0' gem 'calabash-cucumber', '>= 0.16.3'
Update the Gemfile.lock
# Install any new gems that are compatible with your Gemfile $ bundle update
Use bundle exec
# Examples $ bundle exec calabash-ios console $ bundle exec calabash-ios download $ bundle exec calabash-ios sim reset $ APP=/path/to/your.app bundle exec cucumber
For convenience, add this to alias to your
alias be='bundle exec'
# load the alias (all new shells will have the alias) $ source ~/.bash_profile $ be cucumber
Add Gemfile and Gemfile.lock to VCS
All members of your team will be working with the same gem environment.
# Fetch the latest changes $ git pull ... # Install any new gem versions $ bundle install # Run with bundle exec $ be cucumber
New version of Calabash or run-loop?
1. Update your Gemfile if necessary. 2. $ bundle update 3. $ be calabash-ios download 4. Rebuild your app 5. Test 6. Commit the new Gemfile, Gemfile.lock, and calabash.framework