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

On 2 May 2008, at 14:38, sat wrote:

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???
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

On May 2, 6:56 am, Frederick C. [email protected]

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

gem install sqlite3

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.

Install the MySQL driver:

gem install mysql

On MacOS X:

gem install mysql – --include=/usr/local/lib

On Windows:

There is no gem for Windows. Install mysql.so from RubyForApache.

http://rubyforge.org/projects/rubyforapache

And be sure to use new-style password hashing:

http://dev.mysql.com/doc/refman/5.0/en/old-client.html

<%
socket = ["/tmp/mysqld.sock",
“/tmp/mysql.sock”,
“/var/run/mysqld/mysqld.sock”,
“/var/lib/mysql/mysql.sock”].detect{|socket| File.exist?
(socket)}
%>

development:
adapter: mysql
database: yp_development
username: root
password: Jupiter93
host: localhost
encoding: UTF8
socket: <%= socket %>

Warning: The database defined as ‘test’ will be erased and

re-generated from your development database when you run ‘rake’.

Do not set this db to the same as development or production.

test:
adapter: mysql
database: yp_test
username: root
password: Jupiter93
host: localhost
encoding: UTF8
socket: <%= socket %>

production:
adapter: mysql
database: yp_production
username: root
password: Jupiter93
host: localhost
encoding: UTF8
socket: <%= socket %>

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…

On 5 May 2008, at 16:31, jds wrote:

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…

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:inrequire’
/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:innew_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:inrequire_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:inrequire_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:insend’
/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:inretrieve_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:incache’
/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:insend’
/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:inprocess_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:inprocess’
/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:indispatch’
/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:indispatch’
/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:inservice’
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:instart’
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:instart’
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:instart’
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:instart’
/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:ingem_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:inrequire’
/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:inrequire’
/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:inrequire’
script/server:3

Thanks,
Dennis

On Mon, May 5, 2008 at 5:31 PM, jds [email protected]
wrote:

gem install sqlite3 fails - no gem by that name found

The gem is called sqlite3-ruby:

gem install sqlite3-ruby

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