Error using sqlite3

Hello, I’m trying to use sqlite3 and I’ve followed the steps here :
http://wiki.rubyonrails.org/rails/pages/HowtoUseSQLite

However I get the error above (uninitialized constant API) when trying
to run a migration.

I’m under Windows XP, using cygwin, the sqlite3.dll file is on the lib
directory of my rails app (filemon, an utility that reports file access
attempts show me that this file is found and open successfully)

Any help appreciated, thank you

[/home/ruby-tests/mica]>rake db:migrate --trace
(in /home/ruby-tests/mica)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
uninitialized constant API
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:inconst_missing’
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/driver/native/driver.rb:81:in
open' /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/database.rb:111:ininitialize’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/sqlite_adapter.rb:17:in
sql ite3_connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/abstract/connection_specific ation.rb:251:inconnection_without_query_cache=’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/query_cache.rb:54:in
connection=' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/abstract/connection_specific ation.rb:220:inretrieve_connection’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/abstract/connection_specific
ation.rb:78:in connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/migration.rb:281:inmigrate’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/tasks/databases.rake:4
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in
execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:inexecute’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in invoke' /usr/local/lib/ruby/1.8/thread.rb:135:insynchronize’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:inrun’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/usr/local/bin/rake:18
[/home/ruby-tests/mica]>

I am running rails on suse linux (the distribution should not matter)
and I found that after installing the ruby rather than the mswin32
version solved the problem for me.

nuno wrote:

Still having the same error, anybody can help ?

Thank you

Still having the same error, anybody can help ?

Thank you

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs