ruby on rails - Action controller exception sql 2008 connectivity -


i getting following error when trying connect external database run reports off of. sql server 2008 database.

could not load 'active_record/connection_adapters/sqlserver_adapter'. make sure adapter in config/database.yml valid. if use adapter other 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add necessary adapter gem gemfile.

i have added following lines in gem file , have run bundle install

gem 'tiny_tds' gem 'activerecord-sqlserver-adapter', '4.2.10'  

also, additional database outside of normal set.

npr:         adapter: sqlserver         host: *****         port: 1433         database: *****         username: *****         password: *****         encoding: utf8   

i have not found answer why not working currently.

edit

database connect correctly in rails console gem files installed , in gemfile.lock.

i first try in ruby (not rails) console make work tinytds:

client = tinytds::client.new username: 'sa', password: 'secret', host: 'mydb.host.net' 

after that, you'll know if problem comes db setup (mssql in case) or rails config. in comments.


Comments