The One Month Rails project starts me out by installing Ruby & Rails, starting a new local project by adding a new project in Rails, getting it in version control with Git (including setting up my account, my repo and my SSH keys for deployment) and then pushing my local project up to Heroku.
It took about an hour of time to get the project created and pushed, but it’s pretty awesome to see the project live on Heroku with its own URL that anyone can access. Of course, it’s just a default Ruby on Rails project right now with very little changed except for the README file, but it feels like a pretty big step.
There’s a couple of commands I wanted to save here so that I have them for the future.
$ rails new omrails # Create a new Rails application in the folder omrails $ rails server # Run a local server (defaults to localhost:3000) $ git init # Set up Git on your project $ git status # See tracked, untracked, and staged files $ git add . # Add new files to Git $ git commit -am "Initial commit" # Save your project files to Git $ git remote add origin firstname.lastname@example.org/yourusername/omrails.git # Set up git to push to your Github repository $ git push -u origin master # Push your code to Github (sets the upstream the first time) $ git push # Push your code to Github $ ssh -T email@example.com # Attempt to ssh to Github $ mv README.rdoc README.md # Rename the file README.rdoc to README.md $ heroku create # Set up an application on Heroku $ git push heroku master # Push your code to Heroku $ sublime . # Open the current directory in Sublime Text