sync_personal_data_task_for.../README.md

31 lines
1.0 KiB
Markdown
Raw Normal View History

2019-09-23 07:57:30 +00:00
# Usage
2019-09-24 07:55:56 +00:00
## install FreeTDS for school server in advance
```shell
# install steps for Ubuntu
$ sudo apt-get install wget
$ sudo apt-get install build-essential
$ sudo apt-get install libc6-dev
$ sudo wget http://www.freetds.org/files/stable/freetds-1.1.6.tar.gz
$ sudo tar -xzf freetds-1.1.6.tar.gz
$ sudo cd freetds-1.1.6
$ sudo ./configure --prefix=/usr/local --with-tdsver=7.3
$ sudo make
$ sudo make install
```
More infomation please visit [TinyTDS.](https://github.com/rails-sqlserver/tiny_tds)
## do the steps below at the target app directory, not this Orbit module directory(Rails Engine)
2019-09-23 09:31:55 +00:00
* create project\_root/config/initializers/ntnu\_sybase\_config.rb with following content:
2019-09-17 06:04:06 +00:00
```ruby
2019-09-23 07:57:30 +00:00
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'
2019-09-17 06:04:06 +00:00
```
2019-09-23 07:57:30 +00:00
* set cron job to run `bundle exec rake sync_personal_plugins:sync` everyday