ruby - Can not start the rails server due to some SQL server configuration error -


i getting following error when trying start rails server ""rails server" in cmd.

error:

exiting c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-sqlserver-adapter-3.2.13/lib/ac tive_record/connection_adapters/sqlserver_adapter.rb:440:in `execute': closed co nnection (tinytds::error) 

the followings gem , database.yml file.

database.yml:

# mysql.  versions 4.1 , 5.0 recommended. #  # install mysql driver #   gem install mysql2 # # ensure mysql gem defined in gemfile #   gem 'mysql2' # # , sure use new-style password hashing: #   http://dev.mysql.com/doc/refman/5.0/en/old-client.html development:   adapter: sqlserver   mode: dblib   encoding: utf8   reconnect: false   database: swargadwara_puri   pool: 5   username: sa    password: chandra123   dataserver: owl002\sql2012  # warning: database defined "test" erased , # re-generated development database when run "rake". # not set db same development or production. test:   adapter: sqlserver   mode: dblib   encoding: utf8   reconnect: false   database: swargadwara_puri   pool: 5   username: sa   password: chandra123   dataserver: owl002\sql2012  production:   adapter: sqlserver   mode: dblib   encoding: utf8   reconnect: false   database: swargadwara_puri   pool: 5   username: sa   password: chandra123   dataserver: owl002\sql2012 

gemfile:

source 'https://rubygems.org'  gem 'rails', '3.2.19'  # bundle edge rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git'  #gem 'mysql' gem 'tiny_tds' gem 'activerecord-sqlserver-adapter'  # gems used assets , not required # in production environments default. group :assets   gem 'sass-rails',   '~> 3.2.3'   gem 'coffee-rails', '~> 3.2.1'    # see https://github.com/sstephenson/execjs#readme more supported runtimes   # gem 'therubyracer', :platforms => :ruby    gem 'uglifier', '>= 1.0.3' end  gem 'jquery-rails'  # use activemodel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' gem "bcrypt-ruby", :require => "bcrypt" # use jbuilder templates json # gem 'jbuilder'  # use unicorn app server # gem 'unicorn'  # deploy capistrano # gem 'capistrano'  # use debugger # gem 'debugger' gem 'bootstrap-datepicker-rails', '>= 0.6.21' gem 'will_paginate', '~> 3.0' 

and sql server configuration details explained below.

i have enabled tcp/ip in sql configuration.please me resolve error , setup sql server rails well.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -