I am porting a Rails app that is made up of 2 rails projects to SQL
Server. The app already runs with MySQL and Oracle. One Rails project is
the UI with a database that contains user/project specific data. The
second Rails project is the database server for the main data. The UI
makes REST calls to the database to get data to display. There is a list
of product lines that is used on a search screen so the user chooses
which product line to search. My problem is that with SQL Server as the
database, about 80% of the time an exception gets thrown after the first
product line data is returned. The message from the exception is
“undefined method `name’ for nil:NilClass”.
This problem does not happen with MySQL nor Oracle as the database. So,
it appears to be something to do with the database. I am using
activerecord-sqlserver-adapter with a system DSN to connect to the
database. I also had to move from Ruby 1.8.7 back to 1.8.6 to get the
adapter to work at all. I have seen references to using ADO or ODBC
instead.
So my questions are:
- Has anybody else had a similar problem?
- What database adapter is the proper one to use with SQL Server?
Thanks in advance!
Norm