| Article: |
Rolling with Ruby on Rails | |
| Subject: | using oracle instead of mysql doesn't work | |
| Date: | 2005-06-12 20:06:14 | |
| From: | amchi | |
I'm using Oracle instead of mysql for this example. I've also installed Ruby/OCI8 on WinXP Pro. When I try to ruby script\generate model Recipe I get these errors:
|
||
Showing messages 1 through 3 of 3.
-
using oracle instead of mysql doesn't work
2006-02-01 08:46:58 GrantAaron [View]
-
using oracle instead of mysql doesn't work
2005-06-12 20:54:53 Curt Hibbs |
[View]
You should post the to the Rails Mailing List (or the Rails IRC Chat). This is where you'll find the existing expertise with Oracle who can surely help you out. You can find information about both here:
http://wiki.rubyonrails.com/rails/show/HomePage
-
using oracle instead of mysql doesn't work
2005-06-13 08:21:13 amchi [View]
Thanks for pointing me to that page. I referred http://wiki.rubyonrails.com/rails/show/HowtoConnectToOracle and it worked like a charm.
Lesson learnt: If your oracle database is on a remote host, leave the host field blank in database.yml. It'll pick up the value from tnsnames.ora.



development:
adapter: oci
host: hostname/database
username: test
password: test
I got oci8 running successfully, even creating a scaffold from a table in oracle. Granted, i'm running this on a mac (you're on windows)... I used this guide, maybe it will give you some clues:
http://creativi.st/blog/articles/2005/06/25/rails-oracle-client-on-mac-os-x