Forum: Ruby on Rails Problem creating Hello World app in Ruby on Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A771b8b162063627eb5a22e3ea1886d3?d=identicon&s=25 David Park (dparkmit)
on 2008-10-29 07:43
Hi All,

I just installed Ruby on Rails on my MacBook Pro and tried to create the
Hello World app that is documented in the Agile Development with Rails
book.  I followed all the instructions for creating the Hello World app
but get the following error when I try to load
http://localhost:3000/say/hello

MissingSourceFile in SayController#index

no such file to load -- sqlite3


Can anyone please let me know what I need to do to fix this issue?
Thanks!

P.S., I have the following things installed on my MacBook Pro:

1. Ruby 1.8.6
2. Rails 2.1.2
3. MySQL 5.0.67
9b4c04c050122bcea16a6f3376d680fa?d=identicon&s=25 Daniel Bush (danb)
on 2008-10-29 07:59
(Received via mailing list)
David Park wrote:

> no such file to load -- sqlite3
>
If you want to use mysql, then set up your rails project like this:
% rails --database=mysql <name>
If you leave out the database option, rails will assume you want
sqlite3.
(I think mysql used to be the default some time ago).

You can alter the database and connection settings in config/
database.yaml.

--
Daniel Bush
Dd9ab512706dd6cb1de818a658566ba2?d=identicon&s=25 nas (Guest)
on 2008-10-29 14:54
(Received via mailing list)
its looking sqlite3 database which is not installed on your mac.

get the binary for mac from here http://www.sqlite.org/download.html

install it and then run
sudo gem install sqlite3-ruby

and you should be ok to go.

Otherwise if you want to use mysql then change your database.yml file
in the config directory like so (and remove all config options for
sqlite3)

development:
  adapter: mysql
  database: db_name
  username: root
  password:
  host: localhost
  encoding: utf8

do this for test and production as well
A771b8b162063627eb5a22e3ea1886d3?d=identicon&s=25 David Park (dparkmit)
on 2008-10-30 04:15
Thanks for your help!
This topic is locked and can not be replied to.