2014-08-29 109 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