First - I have to say that blogcast needs an autosave feature - I nearly lost a previously drafted version of this. Fortunately, I have a chrome plugin called Lazarus installed which saved my bacon and retrieved the previous draft from a local store. [TODO] Could autosave be a feature I add to blogcast?
Assuming you already have accounts at both github and heroku, here are the necessary steps for managing a project (such as this new instance of blogcast!) in those two cloud based applications.
Adding project to github
Login to github and click on the "New Repository" button on the right hand side.
Change directory into the project you want to add. Create a new .gitignore:
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
config/database.yml
db/schema.rb
nbproject/*
*~
From the command line:
git init
git add .
git commit -m 'first commit'
git remote add origin git@github.com:<username>/<project>.git
git push origin master
Pushing to a new Heroku project
heroku create
heroku db:push
git push heroku master
NOTE: The heroku db:push did not work. This created an issue when I tried to login as admin on the heroku instance of my blog, the admin user did not exist. Easy to get around by using the heroku console:
heroku console
User.create(:name => "Bob", :initials => "sph", :email => "admin@sharpers.com", :login => "admin", :password => "passw0rd", :password_confirmation => "passw0rd")
But I think there must be a way of seeding the database with the admin user (it is supposed to default to admin/admin - but I couldn't find the code where that occurs)