Domanda

I have a Rails 4 project and use activerecord-sqlserver-adapter. The readme installation suggests:

gem 'tiny_tds'
gem 'activerecord-sqlserver-adapter', '~> 4.0.0'

However, bundle install returns:

Resolving dependencies...
Could not find gem 'activerecord-sqlserver-adapter (~> 4.0.0) ruby' in the gems available on this machine.

rubygems.org show the latest version as 3.2.12. How can I bundle install version ~> 4.0.0 as 3.2.12 only supports ActiveRecord 3.x?

È stato utile?

Soluzione

Why not just Source version 4.0.0 of activerecord-sqlserver-adapter directly from Github.

In Gemfile

Replace

gem 'activerecord-sqlserver-adapter', '~> 4.0.0'

With

gem 'activerecord-sqlserver-adapter', '~> 4.0.0', :git => "git://github.com/rails-sqlserver/activerecord-sqlserver-adapter.git"

Altri suggerimenti

They have not provided support for Rails 4 yet, you can try below gem to obtain same thing.

sudo gem install sic-activerecord-sqlserver-adapter

This will work with Rails 4 definitely, i have tried this. thanks.

It says that the adapter is missing.
You should install ruby-odbc and it should work.

gem 'ruby-odbc', '0.99995'
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top