[rspec-users] rspec-rails gem changing connection adapter

Matt Wynne matt at mattwynne.net
Wed Nov 18 14:22:36 EST 2009


On 18 Nov 2009, at 18:39, David Nawara wrote:

> This thread should be titled: "rspec-rails gem changing connection
> adapter?"
>
> I did some puts's and found that something is changing the connection
> adapter to ActiveRecord::ConnectionAdapters::SQLite3Adapter, from my
> specified ActiveRecord::ConnectionAdapters::MysqlAdapter.  Or maybe  
> it's
> causing my connection settings not to apply?
>
> Still not sure if I'm barking up the wrong tree, but the problem still
> does fix itself when i comment out my rspec-rails gem.

Which version of the rspec-rails gem are you using?

Can you check the value of RAILS_ENV before and after the connection  
adapter gets changed? There are plugins and various other things  
(including an old version of rspec-rails) that stomp on RAILS_ENV when  
they load. That might be the problem.

cheers,
Matt

+447974 430184
matt at mattwynne.net
http://mattwynne.net



More information about the rspec-users mailing list