Appendix 3
Ruby Gem Versions

This book uses several Ruby gems for the code examples. Things move quickly in the open source world, and the versions of many of the gems we’ve used will have been superseded by the time you read this. You’ll find the code examples will work best if you use the same versions of the gems as we did, so there’s a complete list of them in this appendix.

To install these gems, create a working directory where you’ll be writing the code examples, and download this Gemfile:

 # This Gemfile lists all Gems used throughout the book - with versions.
 source "https://rubygems.org"
 
 # Build stuff
 gem 'bundler', '1.13.1'
 gem "rake", "11.3.0"
 gem 'watchr', '0.7'
 gem 'bcat', '0.6.2', git: 'https://github.com/tooky/bcat.git',
  branch: 'allow-rack-2'
 
 # General stuff
 gem 'aruba', '0.14.2'
 gem 'cucumber', '3.0.0.pre.1'
 gem 'rspec', '3.5.0'
 
 # Rails stuff
 gem 'activerecord', '5.0.0.1'
 gem 'capybara', '2.9.1'
 gem 'coffee-rails', '4.2.1'
 gem 'cucumber-rails', '1.4.4'
 gem 'database_cleaner', '1.5.3'
 gem 'factory_girl', '4.7.0'
 gem 'jquery-rails', '4.2.1'
 gem 'launchy', '2.4.3'
 gem 'rails', '5.0.0.1'
 gem 'rspec-rails', '3.5.2'
 gem 'sass-rails', '5.0.6'
 gem 'sqlite3', '1.3.11'
 gem 'uglifier', '3.0.2'
 
 # Non Rails stuff
 gem 'childprocess', '0.5.9'
 gem 'httparty', '0.14.0'
 gem 'json', '2.0.2'
 gem 'rack-test', '0.6.3'
 gem 'service_manager', '0.6.4'
 gem 'sinatra', '2.0.0.beta.2'

Now, once you’ve followed the instructions in Appendix 2, Installing Cucumber, you can run the bundle command in the directory where you saved the Gemfile, and exactly the right versions of all the gems should install on your machine.

To ensure that these gem versions don’t clash with other gems on your machine, we recommend either using a feature of RVM called gemsets[76] or prefixing all commands with bundle exec. For example, to run cucumber, you’d run this:

 $ ​​bundle​​ ​​exec​​ ​​cucumber

That way, you’ll ensure that Bundler picks the right set of gem versions using your Gemfile and ignores any other versions you may have already installed on your machine.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.4.179