Sergio Bayona
2006-May-10 06:04 UTC
[Rails] development and production running simultaneously?
I''d like to be able to run both development and production as follows: www.mysite.com will be running production dev.mysite.com will be running development It should run the same code base. The server is RedHat Enterprise 3, Apache, FastCgi. My problem is I don''t know where to set the environment so the application bootstraps depending on the virtual host (www/dev). I''d really appreciate if someone can point me in the right direction. Thanks, Serge
Kenneth Liu
2006-May-10 15:11 UTC
[Rails] development and production running simultaneously?
This seems like a bad idea to me. Isn''t the development code always going to have a newer code base than production? Ideally you want to keep your development and production environments totally separate in order to avoid accidentally putting development level code into production. It''s easy enough to maintain two separate sets of the config files, one for development and one for production, and use the correct ones for the environment you''re deploying to. Ken Sergio Bayona wrote:> I''d like to be able to run both development and production as follows: > > www.mysite.com will be running production > dev.mysite.com will be running development > > It should run the same code base. The server is RedHat Enterprise 3, > Apache, FastCgi. > > My problem is I don''t know where to set the environment so the > application bootstraps depending on the virtual host (www/dev). > > I''d really appreciate if someone can point me in the right direction. >
Roberto Saccon
2006-May-10 16:43 UTC
[Rails] development and production running simultaneously?
I don''t understand how you can run production and development simultanously. Are you developing at a datacenter right in front of your production box ? Or are you hosting at your office and have a big pipe coming in ? On 5/10/06, Kenneth Liu <ken.liu.pub@gmail.com> wrote:> > This seems like a bad idea to me. Isn''t the development code always > going to have a newer code base than production? Ideally you want to > keep your development and production environments totally separate in > order to avoid accidentally putting development level code into > production. > > It''s easy enough to maintain two separate sets of the config files, one > for development and one for production, and use the correct ones for the > environment you''re deploying to. > > Ken > > Sergio Bayona wrote: > > I''d like to be able to run both development and production as follows: > > > > www.mysite.com will be running production > > dev.mysite.com will be running development > > > > It should run the same code base. The server is RedHat Enterprise 3, > > Apache, FastCgi. > > > > My problem is I don''t know where to set the environment so the > > application bootstraps depending on the virtual host (www/dev). > > > > I''d really appreciate if someone can point me in the right direction. > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Roberto Saccon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060510/3d3ecbd3/attachment.html
Bryan Duxbury
2006-May-10 16:54 UTC
[Rails] Re: development and production running simultaneously?
> My problem is I don''t know where to set the environment so the > application bootstraps depending on the virtual host (www/dev).This is definitely the hard way to make it work. Check out another copy of your app into another folder (like .../mysite/dev) and set up a virtual host in Apache. If for some reason you really want to use the same code in two places, you could check out the common parts into one directory, then make symlinks to those directories in "fake" rails folders, having individual config files. -- Posted via http://www.ruby-forum.com/.