How do I configure ruby to mysql by default instead of sqlit

O

Olivier Db

Hello,

I am running Mac OS X 10.6.4 and have installed the following:

ruby-1.9.1-p429
RubyGems 1.3.7
Rails 2.3.8

I am now getting an error because sqlite3 is not installed and I've read
that there are issues installing ruby-sqlite3! SO I'm not sure if I
should (or how to) install sqlite3.

A developer suggested I use sqlite3 for testing and mysql for
production, but wouldn't that mean having to convert my sqlite database
to mysql for production? I might just as well always use mysql, no?

Which leads me to the following question: how do I configure rails to
always default to using mysql database instead of sqlite3?

Thank you for your help.

Best regards,

Olivier
 
L

Luis Lavena

Hello,

I am running Mac OS X 10.6.4 and have installed the following:

ruby-1.9.1-p429
RubyGems 1.3.7
Rails 2.3.8

I am now getting an error because sqlite3 is not installed and I've read
that there are issues installing ruby-sqlite3! SO I'm not sure if I
should (or how to) install sqlite3.

Where are you reading that? installing sqlite3 is as simple as "gem
install sqlite3-ruby"

Please report any issue to SQLite3-Ruby Issue tracker and group:

http://github.com/luislavena/sqlite3-ruby/issues
http://groups.google.com/group/sqlite3-ruby
A developer suggested I use sqlite3 for testing and mysql for
production, but wouldn't that mean having to convert my sqlite database
to mysql for production? I might just as well always use mysql, no?

If you use ActiveRecord and no SQL directly, no. The idea of using a
ORM is to abstract you from the database engine running in the
background.
Which leads me to the following question: how do I configure rails to
always default to using mysql database instead of sqlite3?

config/database.yml

In the future, more questions Rails-specifics are better asked to a
Rails group:

http://groups.google.com/group/rubyonrails-talk

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top