-
Notifications
You must be signed in to change notification settings - Fork 369
Best Practice: Use Gemfile and bundler
Joshua Moody edited this page Sep 25, 2015
·
7 revisions
We do.
What is bundler?
Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. [1]
source 'https://rubygems.org'
gem 'run_loop', '>= 1.5.5', '< 2.0'
gem 'calabash-cucumber', '>= 0.16.3'
# Install any new gems that are compatible with your Gemfile
$ bundle update
$ 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 ~/.bash_profile
.
alias be='bundle exec'
Then use:
# load the alias (all new shells will have the alias)
$ source ~/.bash_profile
$ be cucumber
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
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