-
Notifications
You must be signed in to change notification settings - Fork 385
How to execute ActiveRecord JDBC Adapter unit test and Rails ActiveRecord unit test using rails dev box
Yasuo Honda edited this page Nov 16, 2017
·
15 revisions
This document explains how to execute ActiveRecord JDBC Adapter unit test and Rails ActiveRecord unit test using rails-dev-box for those who are interested in ActiveRecord JDBC Adapter Rails 5 support.
Since this document and this rails-dev-box is created for testing purpose only, then please do not apply changes such as changing mysql root password to empty, allowing all IPv4 connection for PostgreSQL to your production systems.
- Install Virtual Box
- Install Vagrant
- Install git
- Clone rails-dev-box
> git clone -b runs_ar_jdbc https://github.com/yahonda/rails-dev-box.git
- Bring up rails-dev-box
> cd rails-dev-box
> vagrant up
- Log in to rails-dev-box via ssh
> vagrant ssh
- Validate which JRuby version is installed
ubuntu@rails-dev-box:~$ ruby -v
jruby 9.1.14.0 (2.3.3) 2017-11-08 2176f24 OpenJDK 64-Bit Server VM 25.151-b12 on 1.8.0_151-8u151-b12-0ubuntu0.17.04.2-b12 +jit [linux-x86_64]
- Update git config (if necessary)
ubuntu@rails-dev-box:~$ git config --global url."https://".insteadOf git://
- clone ActiveRecord JDBC Adapter
ubuntu@rails-dev-box:~$ git clone https://github.com/jruby/activerecord-jdbc-adapter
ubuntu@rails-dev-box:~$ cd activerecord-jdbc-adapter/
- Execute bundle install to install necessary gems
ubuntu@rails-dev-box:~/activerecord-jdbc-adapter$ bundle install
- Execute test_sqlite3 of ActiveRecord JDBC Adapter
ubuntu@rails-dev-box:~/activerecord-jdbc-adapter$ rake test_sqlite3
- Execute test_mysql of ActiveRecord JDBC Adapter
ubuntu@rails-dev-box:~/activerecord-jdbc-adapter$ rake test_mysql
- Execute test_postgresql of ActiveRecord JDBC Adapter
ubuntu@rails-dev-box:~/activerecord-jdbc-adapter$ rake test_postgresql
Enjoy ActiveRecord JDBC Driver development and testing.