# These commands will help you setup the Rails test environment without problems
# MAKE SURE YOU HAVE VIRTUAL BOX INSTALLED http://www.virtualbox.org/wiki/Downloads
# Copy paste all of following commands in your normal terminal and the following things will happen:
# - rails_test_box dir is created
# - rails master branch is checkout in the dir rails
# - A Gemfile is created and all the gems to run the virtualbox are installed using bundler
# - The rails vagrant box is downloaded and added to your vagrant boxes
# - A Vagrantfile is created for vagrant
# - The rails box will be activated, meaning it will be copied from your vagrant boxes directory and started
# - The 'vagrant ssh' makes you go into the box from now on all the commands are in the virtualbox until you type 'exit'
gem install bundler
git clone git://github.com/rails/rails.git
echo 'source :rubygems
group :virtualbox do
gem "vagrant", "0.3.4"
end' > Gemfile
bundle exec vagrant box add rails_test_box http://files.cookiestack.com/rails_test_env.box
echo 'Vagrant::Config.run do |config|
config.vm.share_folder("rails", "rails", "rails")
config.vm.box = "rails_test_box"
end' > Vagrantfile
bundle exec vagrant up
bundle exec vagrant ssh
# Now you are in the Virtualbox. Start running the tests!