Script/console sqlite3

I hope this is in the right place, if not just point me to the right
place, please.

I’m running through this tutorial:
http://developer.apple.com/tools/developonrailsleopard.html

and everything went swimmingly until I got to the point where I had to
do some db stuff in script/console. I enter what the tutorial tells me
to

vendor1 = Vendor.create(:name => ‘Parties R Us’)

… and I’m supposed to get back

=> #<Vendor id: 1, name: “Parties R Us”, …>

… but instead I get this mess:

MissingSourceFile: no such file to load – sqlite3/database
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in require’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in
require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in
require' from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3.rb:1 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require’
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in
new_constants_in' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/kernel/requires.rb:7:in
require_library_or_gem' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/kernel/reporting.rb:11:in silence_warnings’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/kernel/requires.rb:5:in
require_library_or_gem' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:10:in sqlite3_connection’
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:in
send' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:in connection=’
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:260:in
retrieve_connection' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in connection’
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1145:in
columns' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2598:in attributes_from_column_definition_without_lock’
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/locking/optimistic.rb:55:in
attributes_from_column_definition' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2126:in initialize’
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:638:in
new' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:638:in create’
from (irb):7>>

Help!

On Mon, Jun 30, 2008 at 3:24 PM, Jason Mayoff
[email protected] wrote:

… but instead I get this mess:

You mean a stack trace?

MissingSourceFile: no such file to load – sqlite3/database

http://groups.google.com/group/rubyonrails-talk/msg/366ae75593ed8b46


Greg D.
http://destiney.com/

http://groups.google.com/group/rubyonrails-talk/msg/366ae75593ed8b46

This worked, thanks.

Out of curiousity, is sqlite3 installed?

Also, is the ruby adapter for sqlite3 installed?

And if the answer to both of those is correct, did you remember to do
the migration (rake db:migrate)?

Matt