Archive for the ‘Open Source Development’ Category

Your first Ruby on Rails Application

May 14, 2012 10 comments

The following is an example of how to create a simple ruby on rails application, on a Ubuntu development machine, push it to GitHub source control, and to Heroku for cloud hosting.

Here is the build of tools on my virtual machine:

  • Ubuntu 12.04 LTS
  • Git v
  • Rails v 3.2.3
  • Sublime Text 2 Build 2195

Part 1
mkdir code
rails new app1
cd app1
rails g scaffold post title text:text
rake db:migrate

Part 2

subl Gemfile
[add the following to file]
group :production do
gem 'pg'
group :development, :test do
gem 'sqlite3'
gem install pg
bundle install
[create 'app1' repository at]
git init
git add .
git commit -m "baseline"
git remote add origin
git push -u origin master

Part 3

heroku create -s cedar
git push heroku master
heroku run rake db:migrate
heroku open