Hi there! I just set up 3 instances of the same Rails app (nginx+mongrel_cluster) -- http://pastie.org/336677 -- but for some reason site1 and site2 (despite their own database.yml) end up using site3''s database. What on earth is going on here? Thanks y''all, RV -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Redd Vinylene wrote:> Hi there! > > I just set up 3 instances of the same Rails app (nginx+mongrel_cluster) > -- http://pastie.org/336677 -- but for some reason site1 and site2 > (despite their own database.yml) end up using site3''s database. > > What on earth is going on here? > > Thanks y''all, > RV >Does each virtual host have its own instance of the database server running? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Norm wrote:> Does each virtual host have its own instance of the database server > running?No actually I''m only running one MySQL 5.1 server instance. The OS is FreeBSD. Thank you. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Redd Vinylene wrote:> Hi there! > > I just set up 3 instances of the same Rails app (nginx+mongrel_cluster) > -- http://pastie.org/336677 -- but for some reason site1 and site2 > (despite their own database.yml) end up using site3''s database. > > What on earth is going on here? > > Thanks y''all, > RV >When you say "their own database.yml" do you mean that you have differently named databases in each database.yml? Stupid question but stuff happens. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Norm wrote:> Redd Vinylene wrote: >> > When you say "their own database.yml" do you mean that you have > differently named databases in each database.yml? Stupid question but > stuff happens.Yes, exactly, like site1_production, site2_production and so on. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Redd Vinylene wrote:> Norm wrote: >> Redd Vinylene wrote: >>> >> When you say "their own database.yml" do you mean that you have >> differently named databases in each database.yml? Stupid question but >> stuff happens. > > Yes, exactly, like site1_production, site2_production and so on.So if you start only site2''s mongrel cluster it actually uses the data site3_production, though it''s database.yml specifies site2_production? also, I think you forgot the ''t.'' in your rake tasks task :install_site3 => :environment do |t| t.load_database t.create_keys t.create_preferences t.create_admin end -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
John Yerhot wrote:> > So if you start only site2''s mongrel cluster it actually uses the data > site3_production, though it''s database.yml specifies site2_production? > > also, I think you forgot the ''t.'' in your rake tasks > > task :install_site3 => :environment do |t| > t.load_database > t.create_keys > t.create_preferences > t.create_admin > endActually I fixed it now though. It turned out running "rake install_site1 RAILS_ENV=production" also ran rake install_site2 and rake install_site3 since they were all in the same directory. Deleting the other rake scripts for each instance of my Rails app made everything work just fine. Much obliged everyone! -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---