Coder Social home page Coder Social logo

m2mbrain's Introduction

Developer ODBC

http://honoluluhacker.com/2011/01/13/using-tinytds-to-connect-to-sql-server-with-ruby-on-rails-3-for-mac-osx/

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

Production/Staging ODBC

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

Creating db/m2m_schema.rb

In database.yml, point your development db to an m2m database.

rake db:schema:dump SCHEMA=db/m2m_schema.rb

Revert database.yml.

m2mbrain's People

Contributors

heedspin avatar

Stargazers

Eric Taylor avatar  avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.