Wednesday, June 25, 2014

Working with Heroku and github for ruby on rails development

This is a little rough, but wanted to record the commands I used and why for some ruby on rails development using heroku as a server and github as the source code repository.So, create a project on github and add it to heroku. Then invite yourself to it:#Install heroku toolbelt on your local machine.# copy and paste the invite you get from heroku:git clone git@heroku.com:yourherokurepository.git -o heroku#Add your public key to heroku site git pullchmod 0600 /home/homedir/.netrc heroku logs -a yourherokurepository#because we checked it out from heroku we have to add in the github repository as well.git remote >> only says 'heroku'git remote add origin git@github.com:githubusername/yourherokurepository.git#after you add and commit changes, push the changes out:git push origin master ; git push heroku master#run a local copy of the code for testing:rails s:~$ vi testcommands.editme.txt :~$ cat testcommands.editme.txt #Install heroku toolbeltgit clone git@heroku.com:yourherokurepository.git -o heroku#Add your public key to heroku site# make sure you are upto dategit pull

chmod 0600 /home/homedir/.netrc heroku logs -a yourherokurepository#because we checked it out from heroku we have to add in the github repository as well.git remote >> only says 'heroku'git remote add origin git@github.com:githubusername/yourherokurepository.git#after you add and commit changes, push the changes out:git push origin master ; git push heroku master#run a local copy of the code for testing:rails s