[rspec-users] "no such file to load -- sqlite3" error

Dean Richardson lists at ruby-forum.com
Thu Nov 11 07:49:06 EST 2010


Thanks for your help. I've followed the set-up instructions in the "BDD 
in Rails" chapter successfully up to the "rake db:test:prepare" step. At 
that point, I get the following error:

rake aborted!
no such file to load -- sqlite3

I've attached a document containing my "gem list" output showing the 
presence of the sqlite3-ruby gem and other associated dependencies. The 
document also gives the content of my database.yml file for reference. 
I'm using mysql for my development and production databases.

When I try to switch my test database to mysql too, by editing the 
"test:" section of database.yml, I get the following error:

rake aborted!
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Both of these errors are widely-discussed on message boards, stack 
overflow, etc., but none of the fixes I've found so far there seem to 

Any suggestions for how to make either test database approach (sqlite3 
or mysql) work would be greatly appreciated.

Thanks again for your help,

Dean Richardson

David Chelimsky wrote in post #960323:
> On Nov 9, 2010, at 6:38 AM, Dean Richardson wrote:
>> David:
>> Thanks for prompting me to get the update of the book. So, if I'm not
>> quite ready to make the leap to Rails 3, am I out of luck trying to use
>> RSpec and Cucumber? Is there any intermediate strategy you can suggest?
> rspec-1.3 works fine with rails-2.3, and there are notes about how to
> set this up in the "BDD in Rails" chapter.
> The RSpec Book is more of a workflow/strategy/process book than a
> recipe/syntax book. The latter is present, but not the focus. I'd
> recommend using the versions in the book (listed in the preface) to go
> through the exercises so you can learn how to use these tools
> effectively, and then comb the interwebs for information about whatever
> syntactic differences might be missing from the book. You can also write
> to this list if you have questions about the differences between
> versions.
> HTH,
> David


Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list