Sync personal data for Asia University
Go to file
BoHung Chiu 77a3540538 Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
app Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
bin Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
config Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
lib Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
test Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
.gitignore Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
Gemfile Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
MIT-LICENSE Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
README.md Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
Rakefile Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00
sync_asia_personal_data.gemspec Finish sync tasks for asia. 2021-03-08 22:59:24 +08:00

README.md

Usage

install FreeTDS for school server in advance

# install steps for Ubuntu
$ sudo apt-get install wget
$ sudo apt-get install build-essential
$ sudo apt-get install libc6-dev

wget http://www.freetds.org/files/stable/freetds-1.1.24.tar.gz
tar -xzf freetds-1.1.24.tar.gz
cd freetds-1.1.24
./configure --prefix=/usr/local --with-tdsver=7.3
sudo make
sudo make install

More infomation please visit TinyTDS.

do the steps below at the target app directory, not this Orbit module directory(Rails Engine)

  • create project_root/config/initializers/ntnu_sybase_config.rb with following content:
ENV['USER_NAME'] = 'database user name'
ENV['PASSWORD'] = 'database password'
ENV['NTNU_DB_HOST'] = 'database host'
ENV['NTNU_DB_PORT'] = 'database port'
ENV['TDS_VERSION'] = '5.0'
ENV['DB_NAME'] = 'database name'
ENV['VIEW_RESULT'] = 'database view result'
  • set cron job to run bundle exec rake sync_personal_plugins:sync for nccu everyday
  • set cron job to run bundle exec rake sync_ntnu_personal_plugins:sync for ntnu everyday