sqlite problem

I am a beginner in ruby on rails and I got the error (rake aborted file not found --sqlite) while using the rake command. am using mysql as my database server.. what could be the problem???

You're not giving much detail about your environment (operating system, version of rails, etc.)

But my guess is you need to create your rails app with "rails myapp -d mysql". By default Rails 2.02 will generate a sqlite-specific database.yml file for you, not mysql.

Jeff softiesonrails.com

Does your database.yml file say you are using mysql?

Fred

Hello, I'm in a similar situation.

running on FreeBSD 7, Ruby 1.8, Rails 2.0.2 new install, RoR beginner... Using WEBrick server

after reading the note above - rebuilt app with rails newappname - d mysql - moved app/controller and view for my app to the new rails directory

still getting complaints from activerecord 2.0.2 that sqlite3 is not installed. Now as it happens it is installed, but I want to use mysql. config/database.yml is configured for mysql. I've tried update/uninstall/install on activerecord with no apparent change in result.

Any ideas on how to get past this? thx, Dennis

Please post your gem list and the contents of your config/ database.yml...

Data follows:

*** LOCAL GEMS ***

actionmailer (2.0.2, 1.3.6)     Service layer for easy email delivery and testing.

actionpack (2.0.2, 1.13.6)     Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.6)     Web service support for Action Pack.

activerecord (2.0.2, 1.15.6)     Implements the ActiveRecord pattern for ORM.

activeresource (2.0.2)     Think Active Record for web resources.

activesupport (2.0.2, 1.4.4)     Support and utility classes used by the Rails framework.

color-tools (1.3.0)     color-tools provides colour space definition and manpiulation as     well as commonly named RGB colours.

fastercsv (1.2.3)     FasterCSV is CSV, but faster, smaller, and cleaner.

gem_plugin (0.2.2)     A plugin system based only on rubygems that uses dependencies only

gettext (1.90.0)     Ruby-GetText-Package is a libary and tools to localize messages.

hoe (1.5.1, 1.3.0)     Hoe is a simple rake/rubygems helper for project Rakefiles

image_science (1.1.3)     ImageScience is a clean and happy Ruby library that generates     thumbnails -- and kicks the living crap out of RMagick.

mysql (2.7)     MySQL/Ruby provides the same functions for Ruby programs that the     MySQL C API provides for C programs.

pdf-writer (1.1.3)     A pure Ruby PDF document creation library.

rails (2.0.2, 1.2.6)     Web-application framework with template engine, control-flow layer,     and ORM.

railsbench (0.9.2)     rails benchmarking tools

rake (0.8.1, 0.7.3)     Ruby based make-like utility.

rubyforge (0.4.4)     A script which automates a limited set of rubyforge operations.

RubyInline (3.6.7)     Ruby Inline is an analog to Perl's Inline::C

sources (0.0.1)     This package provides download sources for remote gem installation

transaction-simple (1.4.0)     Simple object transaction support for Ruby.

# MySQL (default setup). Versions 4.1 and 5.0 are recommended.

gem install sqlite3

Unfortunately, it doesn't seem to be that simple.

gem install sqlite3 fails - no gem by that name found

gem install sqlite blows up due to missing files that it can't find on either the file system or the net...

sigh...

What's the stack trace when activerecord tells you it couldn't find sqlite3?

Fred

trace follows:

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:342:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/sqlite3_adapter.rb:10:in `sqlite3_connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:in `send' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:in `connection=' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:78:in `connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ query_cache.rb:8:in `cache' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/caching.rb:677:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:524:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:524:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/filters.rb:685:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session_management.rb:123:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:388:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:171:in `handle_request' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:115:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:126:in `dispatch_cgi' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:9:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 112:in `handle_dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 78:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 62:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/ webrick.rb:66 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:342:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in `require' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb: 39 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' script/server:3

Thanks, Dennis

The gem is called sqlite3-ruby:

   gem install sqlite3-ruby