Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does sqlite3-ruby-1.2.2 not work on OS X?

I am running

  • OS X 10.5,
  • Ruby 1.8.6,
  • Rails 2.1,
  • sqlite3-ruby 1.2.2

and I get the following error when trying to rake db:migrate on an app that works find connected to MySQL.

rake aborted! no such file to load -- sqlite3/database

like image 594
go minimal Avatar asked Sep 14 '26 06:09

go minimal


2 Answers

Jamis has just released 1.2.4, and the comment history on that bug suggests that the fix is in 1.2.3 and later versions. As a quick test, I did the following on an OS X 10.5 box with Ruby 1.8.6:

sudo gem install sqlite3-ruby

(verified version number of 1.2.4)

rails test

(used default database.yml with sqlite3)

cd test
./script/generate model Person name:string
rake db:migrate

Ran fine. The error would have happened when sqlite3 was required before the migration finished, so it looks like they've fixed the issue.

like image 66
Erin Dees Avatar answered Sep 16 '26 21:09

Erin Dees


Looks like there's a bug with 1.2.2. Just roll back to 1.2.1 with:

gem install sqlite3-ruby -v=1.2.1

and that will fix the problem.

like image 45
go minimal Avatar answered Sep 16 '26 19:09

go minimal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!