2014-08-29 79 views
0

我有一个VPS有Debian Wheezy。我在这里部署了我的Ruby on Rails应用程序。数据库驻留在具有Sql Server 2005 Express Edition的并行Windows框中。我有红宝石红宝石2.1.2p95(2014年5月8日修订45877)x86_64的Linux的],轨道的Rails 4.1.5,tiny_tds tiny_tds(0.6.2)和ActiveRecord的 - SQLSERVER适配器activerecord- SQLSERVER适配器(4.1.0) 连接柱明细如下Ruby on Rails与Sql Express 2005连接

gwdb: 
    dataserver: '23.254.130.27\SQLEXPRESS' # event commented this out 
    host: 23.254.130.27 # tried like '23.254.130.27\SQLEXPRESS' didn't work 
    username: "RMDx" 
    password: "N7DF5I9CW0" 
    database: "Gateway" 
    adapter: "sqlserver" 

但得到以下例外情况

/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished) 
     from /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_handling.rb:113:in `retrieve_connection' 
     from /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_handling.rb:87:in `connection' 
     from /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/model_schema.rb:214:in `columns' 
     from /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/model_schema.rb:223:in `columns_hash' 
     from /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/inheritance.rb:180:in `subclass_from_attributes?' 
     from /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/inheritance.rb:23:in `new' 
     from /home/gatewayv2-chile/app/controllers/sa.gw.p.controller.rb:80:in `initialize' 
     from /home/gatewayv2-chile/app/controllers/sa.gw.p.controller.rb:324:in `new' 
     from /home/gatewayv2-chile/app/controllers/sa.gw.p.controller.rb:324:in `<main>' 

PLZ指导我牛逼o连接Sql Server Express版本。 注意应用正常工作和Sql Sever的2005年,2008年企业版本

回答

0

我建议你阅读Developing with MS SQL on your Mac博客文章从Sebastian Porto,他很好地解释了一些技巧和提示 - 它涉及的Mac,但它应该让你加快速度。

+0

跟着文章,但在那天结束的时候,我站在我刚开始的地方。还是一样的错误 – 2014-08-29 12:59:12