Deploying a Rails app on an Ubuntu server using Git
Posted
by NudeCanalTroll
on Stack Overflow
See other posts from Stack Overflow
or by NudeCanalTroll
Published on 2010-06-16T10:47:37Z
Indexed on
2010/06/16
10:52 UTC
Read the original article
Hit count: 237
I'm completely new to Linux, but today I find myself setting up a server (Ubuntu 10.04 LTS lucid) from scratch to host a Rails application.
Anyway, I managed to get a Rails app up and running on the server itself, but I had to scrap that because I want to use Git. So I setup a git repository on the server, then pushed all the code from my local machine to the repository. Buuuut, of course Git doesn't actually store the files themselves in the repository -- all the code for my Rails app is now only on my local machine. How am I supposed to tell the server to host that?
Right now my solution is to have the server use git to pull the code from its own repository. That's the code I'll host for all the world to see. In order to update the code, I guess I'll have to do something like this:
- Update the code on my local machine.
- Do some git adds, git commits, and a git push.
- On the server, do a git pull to update the code.
So my question is, am I doing this the right way?
enter code here
© Stack Overflow or respective owner