Open monteirobrena opened 8 years ago
+Andrea
On Thu, Apr 7, 2016 at 11:56 AM -0700, "Brena Monteiro" notifications@github.com<mailto:notifications@github.com> wrote:
I'm trying to configure my Rails project with SQL on Azure. I'm using Mac OS X 10.11. But when I run rake db:migrate I receive this error TinyTds::Error: Adaptive Server connection failed.
I'm looking for answer in Stackoverflow, too.
You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHubhttps://github.com/Azure/azure-sql-database-samples/issues/12
@monteirobrena Are you able to connect to your Azure SQL Database any tools outside of your Rails app? What happens when you run rake db::setup
?
I fixed it, but I need change my config/database.yml
.
staging:
adapter: sqlserver
username: 'username@database'
password: 'password'
host: 'db-staging.database.windows.net'
port: 1433
database: 'db-staging'
azure: true
@ajlam actually works fine in localhost but now when I move to staging (Ubuntu VM Azure) the same error occurred.
TinyTds::Error: Adaptive Server connection failed
That's so weird! If I setup this configuration as development database, all work correctly. I can connect and save in my database on Azure. But when I try to deploy to staging VM with Capistrano I receive this error
$ cd /var/www/homepage/releases/20160408035644 && ( export RAILS_ENV="staging" ; ~/.rvm/bin/rvm default do bundle exec rake db:migrate )
rake stdout: rake aborted!
TinyTds::Error: Adaptive Server connection failed
/var/www/homepage/shared/bundle/ruby/2.2.0/gems/tiny_tds-0.7.0/lib/tiny_tds/client.rb:74:in `connect'
/var/www/homepage/shared/bundle/ruby/2.2.0/gems/tiny_tds-0.7.0/lib/tiny_tds/client.rb:74:in `initialize'
@monteirobrena Let me test with staging on my end to see if I run into a similar error.
@ajlam any news?
I put my project in my staging server and if I run rails s
inside this folder I can connect with my database. But, if I run my project with Puma and Nginx, I receive this error:
TinyTds::Error (Adaptive Server connection failed):
@monteirobrena sorry for the delay. Still working on trying to repro the issue. I'll try to get back to you asap.
@monteirobrena were you able to figure out what the problem was?
@ajlam not yet.
I'm receiving this error:
[TinyTds][v1.0.2][tsql]: /usr/local/bin/tsql locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Setting db-api-staging as default database in login packet 2Error 20002 (severity 9): Adaptive Server connection failed OS error 60, "Operation timed out" There was a problem connecting to the server
I'm trying to configure my Rails project with SQL on Azure. I'm using Mac OS X 10.11. But when I run
rake db:migrate
I receive this error TinyTds::Error: Adaptive Server connection failed.I'm looking for answer in Stackoverflow, too.
http://stackoverflow.com/questions/36484700/rails-and-azure-tinytdserror-adaptive-server-connection-failed