On Dec 22, 9:29 am, Anandh Kumar <[email protected]> wrote:
> Hi everyone,
>
> Can someone suggest me is there any way in RoR to check for the database
> connection without using database.yml.
>
> I need this because before editing database.yml file i want to check
> whether mysql is installed in the given host.
>
> Any help would be greatly appreciated.

irb -r active_record

irb(main):001:0>
ActiveRecord::Base.establish_connection(:adapter=>mysql, :database=>my_db, 
:username=>my_user, :pass=>my_pass)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to