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. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Dec 22, 9:29 am, Anandh Kumar <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Anandh Kumar wrote in post #969995:> 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.Search the filesystem for mysqld or something. Or ask the sysadmin.> > Any help would be greatly appreciated.Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Sent from my iPhone -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Anandh Kumar wrote in post #969995:> 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.Which Operating system ? HTH, Peter -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, - first check MySQL console, - then ''gem list m'' - you can see here every gem listed starts with letter ''m'' (or simply ''gem list'') - then what other wrote here ''irb -r active_record''. If your Euby, Gem, Rails installed well, you have the necessary gems (see in gem list), then you can edit your Gemfile, then run bundle install, then edit .yaml. I think just give a try, you cannot loose much in early stage. Good luck, gezope n dec. 22, 08:29, Anandh Kumar <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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. > > -- > Posted viahttp://www.ruby-forum.com/.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.