Topic: Deploy from Production to Development

Hello,

  This is a newbie question obviously.  But I am trying to figure out how to bring a production app to my local dev environment.  Should I take the contents of the entire production application folder and simply drop it into my dev directory?  And after I do that, what is the proper command to run schema.rb?  rake db:schema:load

Thanks,

AC

Last edited by anandc77@hotmail.com (2007-03-28 16:46:10)

Re: Deploy from Production to Development

You'll need to change the database.yml file to the proper settings. Also make sure the environment.rb file isn't specifying the production environment. Here's the command for loading the schema:

rake db:schema:load

Railscasts - Free Ruby on Rails Screencasts

Re: Deploy from Production to Development

Thanks.  So I can just copy the contents production app folder into the development app folder?

Also, what is environment.rb?  I have not heard of that.

Re: Deploy from Production to Development

anandc77@hotmail.com wrote:

Thanks.  So I can just copy the contents production app folder into the development app folder?

I was thinking just copy the entire rails project folder, not just the "app" folder. There are some things you won't need in development (log files, etc.) but at least this way you make sure to copy over any plugins, tests, configs, etc. that the project might rely on.

anandc77@hotmail.com wrote:

Also, what is environment.rb?  I have not heard of that.

It's in the "config" folder. It holds a lot of global configuration settings, one of which may be specifying the to use the "production" environment. In that case you would need to change this to development on your machine or just comment it out.

Railscasts - Free Ruby on Rails Screencasts

Re: Deploy from Production to Development

Thanks for the tips.  Now when I run rake db:schema:load, I get the following error:

rake aborted!
getaddrinfo: Name or service not known

From what I have elsewhere, this maybe a SQL connection issue.  But my other Rails apps in my dev environment are functioning properly & can connect to MySQL.  I even added,  socket: /var/lib/mysql/mysql.sock to the database.yml file without any luck.

Any clues?

Thanks!