2 Replies Latest reply: Nov 26, 2007 4:20 PM by dvohra21 RSS

    Database on localhost?

    602431
      Does the database have to be on the localhost for rails to connect to it?
        • 1. Re: Database on localhost?
          589551
          Hi,

          No, rails works well with remote oracle database.

          You have to specify the full path of db in your config/database.yml. For example, you have a user "scott" with password "tiger" on remote database with address "oracle_db.example.com". You can configure development mode in database.yml as following

          -------------- database.yml --------------------
          development:
          adapter: oracle
          database: //oracle_db.example.com/XE
          username: scott
          password: tiger

          ...........

          -----------------------------------------------------

          Hope this helpful!

          Regards,
          Liming
          • 2. Re: Database on localhost?
            dvohra21
            The following database.yml configuration may be used with remote host also.

            development:
            adapter:oci
            database: orcl
            host:
            username: username
            password: password

            The listener is running on remote host and is configured in tnsnames.ora file.