I made my first “big” project but I have some questions regarding to upload it to a repository and then deploy it.
I created a Rails project and I commit all files (ignoring databases and not interesting stuff), that includes production.rb.
The production.rb file have mail configuration, so I have some fake configuration in it.
The problem is that when I deploy, I modify the production.rb file (and 2-3 more files) so my questions comes here:
How I update the project when I push changes? “git pull” won’t work if I push changes on files I modified in local.
I want to upload those files because I want other users be able to use my app without hassle.
Is capistrano a solution for this? AFAIK capistrano relies on a git repo (among others) so if I modify a file locally, capistrano will cry too.
So, what you people does when you have to pull new changes and you have some files modified in local?
If you are making changes to files and you want other people to use them then they should probably be in your git repo. If they have sensitive information in them then (ie. passwords, usernames) then they definatly should not be in your git repo and you can deploy them using the capistrano put command. This command will copy a file, via scp I think, to your deploy server. You can even run the files through erb first so that you can set variables in capistrano or pass variables in and not have to worry about sensitive information being in your git repo. You can find some good information about capistrano here. One of the episodes is a paied episode but if you are doing any amount of rails development then it is a very good resource.