I'm having issues setting up my rails app on a Windows 8.1 machine with Ubuntu through VirtualBox. I've done the following in attempts to try and connect my Ubuntu Guest Rails app to my Windows 8.1 SQL Server Express database.
Bridged Connection
on my Virtual Box network adapterSQL Server Configuration Manager
I enabled TCP/IP under SQL Server Network ConfigurationI am able to run my rails application on ubuntu with rails s
and it runs fine. When I try to access it from my windows host or ubuntu guest it originally shows a GET
until it finally errors and presents me with this message Unable to connect: Adaptive Server is unavailable or does not exist
. I'm unsure what to try next. I was looking for a way to test the connection to the database outside of rails in just terminal to see if I could get a connection first but my attempts so far haven't produced anything. Below is my database.yml. The ip address I'm using is the ip address I get for windows host.
development:
adapter: sqlserver
dataserver: 192.168.1.114:1433
host: 192.168.1.114
port: 1433
database: borneo
username: marvin
password: my_password
pool: 5
timeout: 5000
So I found a solution. After I had turned off the firewall I assumed that the firewall wouldn't be blocking anymore traffic; however, seems that I didn't turn it off properly I guess. The following method solved my problem.
After I did that it worked.