简体   繁体   中英

Ruby on Rail gem install activerecord-sqlserver-adapter error

I'm trying to run rake commands on my local SQL server database using ODBC. I have setup the ODBC connections and thought I had the rails end covered however, i'm running into this error.

Please install the sqlserver adapter: gem install activerecord-sqlserver-adapter (no such file to load -- active_record/connection_adapters/sqlserver_adapter)

I have the following gems installed:

abstract (1.0.0)
actionmailer (3.0.5)
actionpack (3.0.5)
activemodel (3.0.5)
activerecord (3.0.5, 1.15.6)
activerecord-sqlserver-adapter (3.0.10)
activeresource (3.0.5)
activesupport (3.0.5, 1.4.4)
arel (2.0.9)
builder (3.0.0, 2.1.2)
bundler (1.0.10)
dbd-odbc (0.2.4)
dbi (0.4.1)
deprecated (3.0.0, 2.0.1)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.15)
mime-types (1.16)
minitest (2.0.2, 1.6.0)
odbc-rails (1.5)
polyglot (0.3.1)
rack (1.2.2)
rack-mount (0.7.1, 0.6.14)
rack-test (0.5.7)
rails (3.0.5)
railties (3.0.5)
rake (0.8.7)
rdoc (3.5.3, 2.5.8)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.25)

Am I missing a gem? What else do I need to get this running on my windows box?

Thanks in advance for any help :-)

尝试在您的%APP_ROOT%/ Gemfile中添加这样的行

 gem 'activerecord-sqlserver-adapter'

Also, your way behind on the times. First the DBI/DBD-ODBC were removed from the adapter stack about a year ago. Also, the easiest way (and best performance) is to use TinyTDS for the connection mode. See there wiki here.

https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Using-TinyTds

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM