Project

General

Profile

Don't install sqlite3 but sqlite3-ruby gem.

Added by Waterloo Takemura about 14 years ago

Hi. This is not help requesting message, but I just want to share my situation and how I soloved it.

I tried to setup redmine 0.9 using sqlite3 as db along with the instruction here: http://www.redmine.org/wiki/redmine/RedmineInstall
When I do

$ RAILS_ENV=production rake db:migrate

(You can add '--trace' to see the full stacktrace.)

I get

rake aborted!
Object is not missing constant Project!

And I'm stacked here for a day trying uninstalling/installing all gems and ruby. After repeating a couple of times, I figured sqlite3 gem is causing this problem.

$ gem list

*** LOCAL GEMS ***

actionmailer (2.3.5, 2.1.2)
actionpack (2.3.5, 2.1.2)
activerecord (2.3.5, 2.1.2)
activeresource (2.3.5, 2.1.2)
activesupport (2.3.5, 2.1.2)
echoe (3.0.2)
ffi (0.6.2)
gem_plugin (0.2.3)
highline (1.5.0)
rack (1.0.1)
rails (2.3.5, 2.1.2)
rake (0.8.7, 0.8.3)
rubyforge (1.0.0)
rubygems-update (1.3.6)
sqlite3 (0.0.8)
sqlite3-ruby (1.2.5)

You can see 'sqlite3' and 'sqlite3-ruby' gem at the bottom. What you want is 'sqlite3-ruby', not 'sqlite3'.
I don't know why sqlite3 is installed, but guess I just installed it unconsciously. If I care the gem install log of sqlite3, I might have noticed easily. (I usually don't care these logs.) It says

==== WARNING ===================================================================
This is an early alpha version of SQLite3/Ruby FFI bindings!
Currently we support Ruby 1.9 ONLY.

If you need native bindings for Ruby 1.8 - install sqlite3-ruby instead.
You may need to uninstall this sqlite3 gem as well.

Thank you for installing sqlite3 gem! Suggestions: qoobaa@gmail.com
================================================================================

But, it is hard to figure out the cause once it is installed because rake's error log doesn't say anything about sqlite.

After uninstalling 'sqlite3', rake db:migrate works fine.