[Rails] Re: Connection to database
On Dec 22, 9:29 am, Anandh Kumar <li...@ruby-forum.com> 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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home