Skip to content

Instantly share code, notes, and snippets.

@jeroenvandijk
Created May 4, 2010 16:32

Revisions

  1. jeroenvandijk revised this gist May 22, 2010. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions rails_test_box_prepackaged.sh
    Original file line number Diff line number Diff line change
    @@ -18,8 +18,7 @@ git clone git://github.com/rails/rails.git

    echo 'source :rubygems
    group :virtualbox do
    gem "vagrant", "0.3.0"
    gem "virtualbox", "0.6.0"
    gem "vagrant", "0.3.4"
    end' > Gemfile

    bundle install
  2. jeroenvandijk revised this gist May 8, 2010. 3 changed files with 49 additions and 43 deletions.
    43 changes: 0 additions & 43 deletions rails_test_box_prepackaged
    Original file line number Diff line number Diff line change
    @@ -1,43 +0,0 @@
    # MAKE SURE YOU HAVE VIRTUAL BOX INSTALLED http://www.virtualbox.org/wiki/Downloads
    #
    # Copy paste this file in your terminal
    # The following will create a dir which contains the rails repo.
    # You can start edit this later on. It will also create a Gemfile and a Vagrantfile.
    # It will run bundle and it will # download and activate the virtualbox that contains
    # everything you need to start # testing.

    mkdir rails_test_box
    cd rails_test_box
    git clone git://github.com/rails/rails.git

    echo 'source :rubygems
    group :virtualbox do
    gem "vagrant", "0.3.0"
    gem "virtualbox", "0.6.0"
    end' > Gemfile

    bundle install

    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. All you need to do now is go into the rails directory,
    # run bundle install and your # ready to test! If you want to test it for 1.9.1, you
    # have to change to it using rvm and do a bundle install again. To # summarize:

    cd rails
    bundle install
    # to run all tests
    rake



    # to switch to 1.9.1 use the following commands. For more options `rvm usage`
    rvm 1.9.1-p376
    41 changes: 41 additions & 0 deletions rails_test_box_prepackaged.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    # 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
    mkdir rails_test_box
    cd rails_test_box
    git clone git://github.com/rails/rails.git

    echo 'source :rubygems
    group :virtualbox do
    gem "vagrant", "0.3.0"
    gem "virtualbox", "0.6.0"
    end' > Gemfile

    bundle install

    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!

    cd rails
    bundle install
    rake
    8 changes: 8 additions & 0 deletions ruby19.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # To run the tests for 1.9.1-p376 do the following in the VirtualBox
    # If you have logged out, you can log into the box again with 'vagrant ssh'
    # (The bundle install only needs to be run the first time)

    cd ~/rails
    rvm 1.9.1-p376
    bundle install
    rake
  3. jeroenvandijk revised this gist May 6, 2010. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions rails_test_box_prepackaged
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # MAKE SURE YOU HAVE VIRTUAL BOX INSTALLED http://www.virtualbox.org/wiki/Downloads
    #
    # Copy paste this file in your terminal
    # The following will create a dir which contains the rails repo.
    # You can start edit this later on. It will also create a Gemfile and a Vagrantfile.
  4. jeroenvandijk revised this gist May 5, 2010. 1 changed file with 13 additions and 6 deletions.
    19 changes: 13 additions & 6 deletions rails_test_box_prepackaged
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,8 @@
    The following will create a dir which contains the rails repo. You can start edit this later on. It will also create a Gemfile and a Vagrantfile. It will run bundle and it will download and activate the virtualbox that contains everything you need to start testing.
    # Copy paste this file in your terminal
    # The following will create a dir which contains the rails repo.
    # You can start edit this later on. It will also create a Gemfile and a Vagrantfile.
    # It will run bundle and it will # download and activate the virtualbox that contains
    # everything you need to start # testing.

    mkdir rails_test_box
    cd rails_test_box
    @@ -12,7 +16,7 @@ The following will create a dir which contains the rails repo. You can start edi

    bundle install

    bundle exec vagrant add http://files.cookiestack.com/rails_test_env.box
    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")
    @@ -22,13 +26,16 @@ The following will create a dir which contains the rails repo. You can start edi
    bundle exec vagrant up
    bundle exec vagrant ssh

    Now you are in the Virtualbox. All you need to do now is go into the rails directory, run bundle install and your ready to test! If you want to test it for 1.9.1, you have to change to it using rvm and do a bundle install again. To summarize:
    # Now you are in the Virtualbox. All you need to do now is go into the rails directory,
    # run bundle install and your # ready to test! If you want to test it for 1.9.1, you
    # have to change to it using rvm and do a bundle install again. To # summarize:

    cd rails
    bundle install
    rake # to do all tests
    # to run all tests
    rake




    rvm 1.9.1-p376 # to switch to 1.9.1 and use the following commands
    # to switch to 1.9.1 use the following commands. For more options `rvm usage`
    rvm 1.9.1-p376
  5. jeroenvandijk revised this gist May 4, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rails_test_box_prepackaged
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ The following will create a dir which contains the rails repo. You can start edi

    bundle install

    bundle exec vagrant add <url here! rails_test_env.box>
    bundle exec vagrant add http://files.cookiestack.com/rails_test_env.box

    echo 'Vagrant::Config.run do |config|
    config.vm.share_folder("rails", "rails", "rails")
  6. jeroenvandijk created this gist May 4, 2010.
    34 changes: 34 additions & 0 deletions rails_test_box_prepackaged
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    The following will create a dir which contains the rails repo. You can start edit this later on. It will also create a Gemfile and a Vagrantfile. It will run bundle and it will download and activate the virtualbox that contains everything you need to start testing.

    mkdir rails_test_box
    cd rails_test_box
    git clone git://github.com/rails/rails.git

    echo 'source :rubygems
    group :virtualbox do
    gem "vagrant", "0.3.0"
    gem "virtualbox", "0.6.0"
    end' > Gemfile

    bundle install

    bundle exec vagrant add <url here! 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. All you need to do now is go into the rails directory, run bundle install and your ready to test! If you want to test it for 1.9.1, you have to change to it using rvm and do a bundle install again. To summarize:

    cd rails
    bundle install
    rake # to do all tests




    rvm 1.9.1-p376 # to switch to 1.9.1 and use the following commands