Hi, i''m wondering how to setup a staging site for my RoR app. Right now i run webrick on my laptop to develop, then i svn commit my changes to the production server. However i need to make my development environment available to others and not just for me on my laptop. I have RoR setup on a hosted vps server which runs in production environment. Its on apache 1.3 and mysql. How can i setup a staging site on this server? Is this recommended? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060424/50e33cff/attachment.html
does anyone know how i can setup a subdomain to run my rails app in development environment? I think with this i can test and debug on the staging subdomain, and the update the code in the main domain when its ready. Will this work? How do i setup the staging subdomain? Your help is much appreciated. -Manish On 4/23/06, Manish Shah <mnshah@gmail.com> wrote:> > Hi, i''m wondering how to setup a staging site for my RoR app. Right now i > run webrick on my laptop to develop, then i svn commit my changes to the > production server. However i need to make my development environment > available to others and not just for me on my laptop. > > I have RoR setup on a hosted vps server which runs in production > environment. Its on apache 1.3 and mysql. How can i setup a staging site > on this server? Is this recommended? > > Thanks in advance. >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060424/f706ff10/attachment.html
I use port forwarding -- you might use name-based resolution -- and start a new lighttpd server for the staging "server." The key is it''s in a different server process and (I hope) hits a different database. -- View this message in context: http://www.nabble.com/setup-a-staging-site--t1497029.html#a4074021 Sent from the RubyOnRails Users forum at Nabble.com.
i''m running apache 1.3 so i dont know if this solution will work for me. On 4/24/06, s.ross <cwdinfo@gmail.com> wrote:> > > I use port forwarding -- you might use name-based resolution -- and start > a > new lighttpd server for the staging "server." The key is it''s in a > different > server process and (I hope) hits a different database. > -- > View this message in context: > http://www.nabble.com/setup-a-staging-site--t1497029.html#a4074021 > Sent from the RubyOnRails Users forum at Nabble.com. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/20b40f56/attachment.html
how about a virtual host? -- View this message in context: http://www.nabble.com/setup-a-staging-site--t1497029.html#a4075132 Sent from the RubyOnRails Users forum at Nabble.com.
i think a virtual host would work, not sure on how it should be set though. I''d like to know how the dispatch.fcgi will work with two rails apps running, one being the main site, and one being the staging site. Also, in regards to the database, i''m assuming that the main site will be using the railsapp_production database and the staging site will use railsapp_development database. Is this correct? Is this stupid? Thanks so much for the help. On 4/24/06, s.ross <cwdinfo@gmail.com> wrote:> > > how about a virtual host? > -- > View this message in context: > http://www.nabble.com/setup-a-staging-site--t1497029.html#a4075132 > Sent from the RubyOnRails Users forum at Nabble.com. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/89dc531b/attachment.html
Manish Shah wrote:> i think a virtual host would work, not sure on how it should be set > though. > I''d like to know how the dispatch.fcgi will work with two rails apps > running, one being the main site, and one being the staging site. > > Also, in regards to the database, i''m assuming that the main site will > be > using the railsapp_production database and the staging site will use > railsapp_development database. Is this correct? Is this stupid? > > Thanks so much for the help.Hi Manish, You''ll run two different FCGI processes, one for each environment. I''d agree with your choice of the dev db rather than test, as test gets autoblownaway every time you run the tests. Can you post your current apache config (the fcgi bit) and I''ll have a go at showing what I mean. Since you''re not actually *developing* on that staging server, the development db should be untouched. Capistrano should be helpful for this kind of activity. Jamis has an article, from back when it was called Switchtower, that may or may not be useful: http://jamis.jamisbuck.org/articles/2006/01/03/using-switchtower-with-multiple-deployment-stages Alan -- Posted via http://www.ruby-forum.com/.
On Apr 25, 2006, at 3:26 AM, Alan Francis wrote:> You''ll run two different FCGI processes, one for each environment. > I''d > agree with your choice of the dev db rather than test, as test gets > autoblownaway every time you run the tests.You don''t need to use the ''dev'' DB. It would be cleaner by far to setup a staging DB by making a new ''staging'' entry in database.yml and a new file under config/environments/staging.rb (that has the same settings as development.rb). -- -- Tom Mornini
Here is my httpd.conf. Your help is much appreciated (if some of these settings are wrong, please indicate) NameVirtualHost xxx.xxx.xxx.xxx:80 <IfModule mod_fastcgi.c> FastcgiIpcDir /tmp/fcgi_ipc/ #AddHandler fastcgi-script .fcgi FastCgiServer /path/to/rails/root/public/dispatch.fcgi -initial-env RAILS_ENV=production -processes 3 -idle-timeout 120 </IfModule> <VirtualHost xxx.xxx.xxx.xxx> ServerAlias railsapp.com ServerAdmin webmaster@railsapp.com DocumentRoot /path/to/rails/root/public/ ErrorLog /path/to/rails/root/log/server.log BytesLog domlogs/railsapp.com-bytes_log ServerName www.railsapp.com AddHandler cgi-script .cgi <Directory /path/to/rails/root/public/> Options ExecCGI FollowSymLinks AllowOverride all Allow from all Order allow,deny </Directory> On 4/25/06, Tom Mornini <tmornini@infomania.com> wrote:> > On Apr 25, 2006, at 3:26 AM, Alan Francis wrote: > > > You''ll run two different FCGI processes, one for each environment. > > I''d > > agree with your choice of the dev db rather than test, as test gets > > autoblownaway every time you run the tests. > > You don''t need to use the ''dev'' DB. It would be cleaner by far to setup > a staging DB by making a new ''staging'' entry in database.yml and a new > file under config/environments/staging.rb (that has the same settings > as development.rb). > > -- > -- Tom Mornini > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/b1ea11f0/attachment.html
You''ll need a copy of the same section but, just add a ServerName to it. Of course the directories and such will need to be modified accordingly. Like: <VirtualHost xxx.xxx.xxx.xxx > ServerAlias railsapp.com ServerAdmin webmaster@railsapp.com ServerName staging.railsapp.com Michael On 4/25/06, Manish Shah <mnshah@gmail.com> wrote:> Here is my httpd.conf. Your help is much appreciated (if some of these > settings are wrong, please indicate) > > NameVirtualHost xxx.xxx.xxx.xxx:80 > > <IfModule mod_fastcgi.c> > FastcgiIpcDir /tmp/fcgi_ipc/ > #AddHandler fastcgi-script .fcgi > FastCgiServer /path/to/rails/root/public/dispatch.fcgi > -initial-env RAILS_ENV=production -processes 3 -idle-timeout 120 > </IfModule> > > <VirtualHost xxx.xxx.xxx.xxx > > ServerAlias railsapp.com > ServerAdmin webmaster@railsapp.com > DocumentRoot /path/to/rails/root/public/ > ErrorLog /path/to/rails/root/log/server.log > BytesLog domlogs/railsapp.com-bytes_log > ServerName www.railsapp.com > AddHandler cgi-script .cgi > > <Directory /path/to/rails/root/public/> > Options ExecCGI FollowSymLinks > AllowOverride all > Allow from all > Order allow,deny > </Directory> > > > > On 4/25/06, Tom Mornini < tmornini@infomania.com> wrote: > > On Apr 25, 2006, at 3:26 AM, Alan Francis wrote: > > > > > You''ll run two different FCGI processes, one for each environment. > > > I''d > > > agree with your choice of the dev db rather than test, as test gets > > > autoblownaway every time you run the tests. > > > > You don''t need to use the ''dev'' DB. It would be cleaner by far to setup > > a staging DB by making a new ''staging'' entry in database.yml and a new > > file under config/environments/staging.rb (that has the same settings > > as development.rb). > > > > -- > > -- Tom Mornini > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
i created a subdomain through cpanel and editted the new virtualhost section as follows: <VirtualHost xxx.xxx.xxx.xxx> ServerAlias staging.railsapp.com ServerAdmin admin@railsapp.com DocumentRoot /path/to/staging/root/public/ ErrorLog /path/to/staging/root/public/log/server.log BytesLog domlogs/staging.railsapp.com-bytes_log ServerName staging.railsapp.com User railsapp Group railsapp CustomLog /usr/local/apache/domlogs/staging.railsapp.com combined ScriptAlias /cgi-bin/ /home/railsapp/public_html/staging/cgi-bin/ </VirtualHost> However, when i try to go to staging.railsapp.com, i get this error: Application error Rails application failed to start properly" What am i missing? Also, should i be running different fcgi processes so the staging subdomain can run in development environment? What is the best way to get staging in the development environment if this is even recommended? On 4/25/06, Michael Trier <mtrier@gmail.com> wrote:> > You''ll need a copy of the same section but, just add a ServerName to > it. Of course the directories and such will need to be modified > accordingly. Like: > > <VirtualHost xxx.xxx.xxx.xxx > > ServerAlias railsapp.com > ServerAdmin webmaster@railsapp.com > ServerName staging.railsapp.com > > Michael > > On 4/25/06, Manish Shah <mnshah@gmail.com> wrote: > > Here is my httpd.conf. Your help is much appreciated (if some of these > > settings are wrong, please indicate) > > > > NameVirtualHost xxx.xxx.xxx.xxx:80 > > > > <IfModule mod_fastcgi.c> > > FastcgiIpcDir /tmp/fcgi_ipc/ > > #AddHandler fastcgi-script .fcgi > > FastCgiServer /path/to/rails/root/public/dispatch.fcgi > > -initial-env RAILS_ENV=production -processes 3 -idle-timeout 120 > > </IfModule> > > > > <VirtualHost xxx.xxx.xxx.xxx > > > ServerAlias railsapp.com > > ServerAdmin webmaster@railsapp.com > > DocumentRoot /path/to/rails/root/public/ > > ErrorLog /path/to/rails/root/log/server.log > > BytesLog domlogs/railsapp.com-bytes_log > > ServerName www.railsapp.com > > AddHandler cgi-script .cgi > > > > <Directory /path/to/rails/root/public/> > > Options ExecCGI FollowSymLinks > > AllowOverride all > > Allow from all > > Order allow,deny > > </Directory> > > > > > > > > On 4/25/06, Tom Mornini < tmornini@infomania.com> wrote: > > > On Apr 25, 2006, at 3:26 AM, Alan Francis wrote: > > > > > > > You''ll run two different FCGI processes, one for each environment. > > > > I''d > > > > agree with your choice of the dev db rather than test, as test gets > > > > autoblownaway every time you run the tests. > > > > > > You don''t need to use the ''dev'' DB. It would be cleaner by far to > setup > > > a staging DB by making a new ''staging'' entry in database.yml and a new > > > file under config/environments/staging.rb (that has the same settings > > > as development.rb). > > > > > > -- > > > -- Tom Mornini > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/4ff01da4/attachment.html
That should happen through your .htaccess file in /public. I''m not familiar with cpanel, but in plesk I set the general settings in the httpd.conf, actually in the mods-available conf. I then do the specifics in the .htaccess file. So if I want to run one as production and one as development I can do that by setting it in the .htaccess. Also I''m using fcgid with Apache2 so there''s differences there as well. Are you in a shared environment? Do you have root access to the server? Michael
yes i have root access. I''m just not sure what changes to make and where to make them. thanks for your help. On 4/25/06, Michael Trier <mtrier@gmail.com> wrote:> > That should happen through your .htaccess file in /public. I''m not > familiar with cpanel, but in plesk I set the general settings in the > httpd.conf, actually in the mods-available conf. I then do the > specifics in the .htaccess file. So if I want to run one as > production and one as development I can do that by setting it in the > .htaccess. Also I''m using fcgid with Apache2 so there''s differences > there as well. Are you in a shared environment? Do you have root > access to the server? > > Michael > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/17649c21/attachment-0001.html