Hi, I am working on my first rails app and have a working app on my local machine. I notice that in the database config file you set up development test and production variables. Does rails have some sort of script/system by which i can move my code from my local dev environment to a production server. Or do i have to manually run the commands on my production server to replicate my dev server. Thanks :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Dec 14, 2007 3:56 PM, B <bilalallawala-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > I am working on my first rails app and have a working app on my local > machine. I notice that in the database config file you set up > development test and production variables. Does rails have some sort > of script/system by which i can move my code from my local dev > environment to a production server. Or do i have to manually run the > commands on my production server to replicate my dev server.Google for capistrano. -- Greg Donald http://destiney.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 -~----------~----~----~----~------~----~------~--~---
I guess the main thing I am confused about is that in database.yml 3 environments are set up. What distinguishes which database is used? How can I get my application to use the database that is listed as production? Is there a defined process that I am to follow when moving to test to development to production thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
felipekk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-15 06:07 UTC
Re: moving app from dev to production
http://wiki.rubyonrails.org/rails/pages/HowtosDeployment The above link will help you understand a little better how the process of deploying rails to production works. Capistrando is a very helpful tool, but its not hard to do it manually. Basically, what you have to do is: 1. Prepare the production server --Install: gems, ruby, rails --Select a web server application: apache, mongrel, etc --Configure the web server application: this is the hardest part IMO 2. Copy the files --Copy the whole rails structure you have locally to the production server --If you are going to use FCGI, you will need to fix the dispatch.fcgi in your new server. The deployment guides should help you on this 3. Create database/user --Don''t forget to migrate the database: rake db:migrate RAILS_ENV=production 4. Run the web server app and see if it works --Go back to Configuring the web server app and fix it --Usually in the web server app you will be able to configure which RAILS_ENV to run. If it does not work and rails keeps running on development, edit environments.rb and uncomment the line where it sais RAILS_ENV ||= production. This is just a basic guide. I probably forgot something. Use the guides to help you, use Google search and also this list''s search to get more information about problems you encounter. This is a step that is going to take a few hours for you to get going, but you only need to go trough it once for each production server you build. If all you want is to run WEBrick in production environment, use ruby script/server -e production. GL On Dec 14, 6:10 pm, B <bilalallaw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I guess the main thing I am confused about is that in database.yml 3 > environments are set up. What distinguishes which database is used? > How can I get my application to use the database that is listed as > production? Is there a defined process that I am to follow when moving > to test to development to production > > thanks--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
felipekk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-15 06:09 UTC
Re: moving app from dev to production
The linewrapping might make it hard to get the commands right: To build the production database (after you have created the user/pass/ db as in database.yml): "rake db:migrate RAILS_ENV=production" To run WEBrick in production environment: "ruby script/server -e production" On Dec 14, 10:07 pm, "felip...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <felip...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> http://wiki.rubyonrails.org/rails/pages/HowtosDeployment > > The above link will help you understand a little better how the > process of deploying rails to production works. > > Capistrando is a very helpful tool, but its not hard to do it > manually. > > Basically, what you have to do is: > > 1. Prepare the production server > --Install: gems, ruby, rails > --Select a web server application: apache, mongrel, etc > --Configure the web server application: this is the hardest part IMO > 2. Copy the files > --Copy the whole rails structure you have locally to the production > server > --If you are going to use FCGI, you will need to fix the dispatch.fcgi > in your new server. The deployment guides should help you on this > 3. Create database/user > --Don''t forget to migrate the database: rake db:migrate > RAILS_ENV=production > 4. Run the web server app and see if it works > --Go back to Configuring the web server app and fix it > --Usually in the web server app you will be able to configure which > RAILS_ENV to run. If it does not work and rails keeps running on > development, edit environments.rb and uncomment the line where it sais > RAILS_ENV ||= production. > > This is just a basic guide. I probably forgot something. Use the > guides to help you, use Google search and also this list''s search to > get more information about problems you encounter. > > This is a step that is going to take a few hours for you to get going, > but you only need to go trough it once for each production server you > build. > > If all you want is to run WEBrick in production environment, use ruby > script/server -e production. > > GL > > On Dec 14, 6:10 pm, B <bilalallaw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I guess the main thing I am confused about is that in database.yml 3 > > environments are set up. What distinguishes which database is used? > > How can I get my application to use the database that is listed as > > production? Is there a defined process that I am to follow when moving > > to test to development to production > > > thanks--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---