Todd Benson
10/28/2008 6:37:00 PM
On Tue, Oct 28, 2008 at 1:06 PM, Cetric Blue <shalicheng@gmail.com> wrote:
> And here is what's in my database.yml file:
>
> require 'active_record'
> require 'rubygems'
>
>
> ActiveRecord::Base.establish_connection(
> :adapter => "oracle_enhanced",
> :database => "xyz",
> :username => "user1",
> :password => "password1",
> :host => "abc.def.jkl")
>
> class Connect < ActiveRecord::Base
> set_table_name "changelog"
> end
>
> current_db = Connect.find(:first, :order => 'applied_dttm DESC')
>
> Everything worked well in Windows, but once I moved it to Linux, things
> are so messed up.
I'm 90% sure I'm wrong on this, but you never know. Have you verified
that the database is running (in other words, can you connect
directly)?
One small other thing... you should require 'rubygems' before you
require any other gem. That's not part of your problem, though,
judging by your errors. Just something to keep in mind, I suppose.
One other thing to think about is what port does the database respond
to? Is it over the network or local?
Todd