# Rake db:migrate tries to use sqlite :-/

**URL:** <https://www.ruby-forum.com/t/rake-db-migrate-tries-to-use-sqlite/184231>\
**Category:** Rails\
**Created:** [February 26, 2010, 11:24pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-tries-to-use-sqlite/184231 "2010-02-26T23:24:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterbe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@peterbe](https://www.ruby-forum.com/u/peterbe)\
**Post date:** [February 26, 2010, 11:24pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-tries-to-use-sqlite/184231/1 "2010-02-26T23:24:21Z")

</div>

Hi

I’m setting up Instiki on a webserver (VPS, linux.)

Here’s my error:  
[instiki-0.17]$ rake db:migrate  
(in /home/peter/pehrlich.com/html/instiki-0.17)  
rake aborted!  
no such file to load – sqlite3  
/home/peter/pehrlich.com/html/instiki-0.17/rakefile.rb:10  
(See full trace by running task with --trace)

And here’s my config/database.yml:  
production:  
adapter: mysql  
encoding: utf8  
reconnect: false  
database: pehrlich\_wiki  
pool: 5  
username: peter  
password: [hidden]  
socket: /var/lib/mysql/mysql.sock

This makes no sense. I’ve tried everything. Why is it being contrary?

Thanks!!

---

<div class="post-metadata">

**Author:** ![peterbe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@peterbe](https://www.ruby-forum.com/u/peterbe)\
**Post date:** [February 26, 2010, 11:34pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-tries-to-use-sqlite/184231/2 "2010-02-26T23:34:55Z")

</div>

On Fri, Feb 26, 2010 at 4:24 PM, Peter E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi
> 
> I’m setting up Instiki on a webserver (VPS, linux.)
> 
> Here’s my error:  
> [instiki-0.17]$ rake db:migrate

RAILS\_ENV=production rake db:migrate

> production:  
> adapter: mysql  
> encoding: utf8  
> reconnect: false  
> database: pehrlich\_wiki  
> pool: 5  
> username: peter  
> password: [hidden]  
> socket: /var/lib/mysql/mysql.sock

–  
Greg D.  
[destiney.com](http://destiney.com) | [gregdonald.com](http://gregdonald.com)

---

<div class="post-metadata">

**Author:** ![peterbe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@peterbe](https://www.ruby-forum.com/u/peterbe)\
**Post date:** [May 5, 2010, 11:27pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-tries-to-use-sqlite/184231/3 "2010-05-05T23:27:07Z")

</div>

I had the same issue and fixed it by removing hard-coded references to  
SQLite in this file:  
lib/tasks/upgrade\_instiki.rake

…

# The following will not work on a non-SQLite installation

db = SQLite3::Database.new( “db/production.db.sqlite3” )  
db.execute( “select \* from webs” ) do |row|  
…

I just deleted the entire task and left the file empty, as I currently  
have no need to upgrade. I’m guessing you could just replace the  
reference to SQLite with your database of choice if you needed this rake  
task. I’m happy without it.

-Ben Ridout

---

<div class="post-metadata">

**Author:** ![peterbe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@peterbe](https://www.ruby-forum.com/u/peterbe)\
**Post date:** [February 26, 2010, 11:41pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-tries-to-use-sqlite/184231/4 "2010-02-26T23:41:07Z")

</div>

No change, unfortunately.

I forget to mention this earlier, I’m using Passenger, if that could  
change anything!

Greg D. wrote:

> On Fri, Feb 26, 2010 at 4:24 PM, Peter E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> RAILS\_ENV=production rake db:migrate
