I have written both an installation and configuration article and an accessing databases FAQ for projects built using NetBeans Ruby support. However, because there are lots of different configuration paths, and each path requires some in-depth information, neither of these documents make it easy to quickly figure out what you must do to set up your Rails project to access your database server. I created this chart to hopefully make the steps simpler, and more clear. If you need more details, then consult the two documents that I mention above.
| Steps for Accessing Databases Using NetBeans
Ruby Support |
| |
|
Using JRuby
|
| |
Using MySQL
|
| |
| |
Using JDBC
Do: Put the MySQL JDBC 3.0 compliant driver in netbeans-install-dir/ruby1/jruby-1.0.1/lib.
Do: Select the database server from the drop-down list in the New Project wizard.
Do: Select the Access Database Using JDBC checkbox in the New Project wizard.
|
|
| |
| |
|
Using the Bundled MySQL Adapter
Do: Select the database server from the drop-down list in the New Project wizard.
Do: Clear the Access Database Using JDBC checkbox in the New Project wizard.
| |
|
| |
Not Using MySQL
|
| |
Do: Put
database's JDBC 3.0 compliant driver
in
netbeans-install-dir/ruby1/jruby-1.0.1/lib
Do: Select
the database server from the drop-down list in
the New Project wizard.
Do: Select the
Access Database Using JDBC checkbox in the New
Project wizard.
Notes:
Currently,
the supported databases are: MySQL,
PostgresSQL, Oracle, HSQLDB, and Java DB
(also known as Derby). The database's
JDBC driver must be a pure Java driver.
If you are deploying to GlassFish, you must
also put a copy of your database server's JDBC
driver in glassfish-install-dir/lib and
start (or restart) the GlassFish server.
|
|
|
| |
|
Using Native Ruby
|
| |
Using MySQL
|
| |
Using the Bundled MySQL Adapter
|
| |
Do: Select the database server from the
drop-down list in the New Project wizard.
Do: Clear the Access Database Using JDBC
checkbox in the New Project wizard.
|
|
| |
Using a MySQL Gem
|
| |
Do: Consult
Ruby on Rails MySQL page. Download and
install appropriate software.
Do: Select the database server
from the drop-down list in the New Project
wizard.
Do: Clear the Access Database
Using JDBC checkbox in the New Project wizard.
|
|
|
| |
Not Using MySQL
|
| |
Do: Consult the
Ruby on Rails Database Drivers page. Download
and install appropriate software.
Do: Select the database server from
the drop-down list in the New Project wizard.
Do: Clear the Access Database Using JDBC
checkbox in the New Project wizard.
|
|
|
All
|
| |
Do: Edit database.yml to
specify username, password, and, if
necessary, database name.
|