Instructions for Tasci File Merger
Installation
- Install Ruby.
- http://rubyinstaller.org/
- Download Ruby 2.1.5 (x64) installer.
- Install to desired RUBY_DIRECTORY
- Choose option to add ruby to PATH
- Choose option to associate *.rb files with Ruby
- Verify ruby installation.
- Go into command line.
- Enter
ruby -v - Ouput should look like
ruby 2.1.5p273... - Enter
gem -v - Output should look like
2.2.2
- Fix potential RubyGems certificate bug, as documented on this page
- Try running
gem install activesupport --no-ri --no-rdoc - Click
Allow accessif prompted by Windows Firewall message, choosing option for Private networks - If installation fails with an
SSL_error, follow the following steps:- Save certificate file from this website to the Downloads directory.
- *Make sure file is saved with the .pem extension
- Find rubygems folder location by typing
gem which rubygemsinto the console. You should get output likeC:/Ruby21/lib/ruby/2.1.0/rubygems.rb - Locate the directory and open it in an explorer window. For the above path, the directory would be
C:\Ruby21\lib\ruby\2.1.0\rubygems - Open the
ssl_certsdirectory, and copy the previously-downloaded*.pemfile into this directory. - Close and re-open a console window.
- Install required gem.
- Run:
gem install tasci_merger
Usage in IRB
-
Open console and run
irbto open interactive ruby console. -
Run
require 'tasci_merger' -
Create tasci merger object:
tm = TasciMerger.new("SUBJECT_CODE", "TASCI_DIRECTORY", "OUTPUT_DIRECTORY")- Create master file:
tm.create_master_list- Create 2 merged files:
tm.merge_filesCommand-line Usage
The ruby gem makes the tasci_merger command available.
The command takes the following parameters:
- SUBJECT_CODE
- TASCI_DIRECTORY
- OUTPUT_DIRECTORY
The command creates a master file and two merged files in the output directory.
Example Usage:
merge_tasci 3441GX X:/TasciFilesFor3441GX C:/Circadian
This command would create the 2 files in the C:/Circadian directory.