brew install freetds brew install ruby-odbc Installed /usr/local/Cellar/ruby-odbc/0.99991/lib/odbc.bundle
If brew install freetds does not work, you can install the old version:
- copy tarball from Dropbox/opt
- cd freetds-0.82
- ./configure --prefix=/usr/local/Cellar/freetds/0.82 --with-tdsver=8.0 --enable-msdblib
- make ; make install
You will need to add this to your RUBYLIB by adding the following line to .profile or .bashrc or equivalent:
export RUBYLIB="/usr/local/lib:$RUBYLIB"
You will need to edit freetds.conf
- /usr/local/Cellar/freetds/0.82/etc
- Check config/odbc
Edit odbcinst.ini and odbc.ini files
- /usr/local/Cellar/unixodbc/2.3.0/etc
- Check config/odbc
Enabling odbc:
sudo odbcinst -i -d -f /usr/local/Cellar/unixodbc/2.3.0/etc/odbcinst.ini
Test your connection
- isql -v m2m_dsn sa password
I actually don't know if this is how we did it: sudo apt-get update sudo apt-get install unixodbc unixodbc-dev tdsodbc sqsh sudo chmod 1644 /etc/odbc* /etc/freetds/freetds.conf
Modify /etc/environment and /etc/profile per the config/odbc/ubuntu hints.
Enabling odbc:
sudo odbcinst -i -d -f /etc/odbcinst.ini
In database.yml, point your development db to an m2m database.
rake db:schema:dump SCHEMA=db/m2m_schema.rb
Revert database.yml.