Tip:
Highlight text to annotate it
X
in this example we will be using heroku to demonstrate the on demand characteristic of
the cloud.
heroku allows its users to upload ruby on rails applications to heroku's servers.
to set up heroku i have created an account with them and installed a number of heroku
related ruby on rails gems.
i've also made sure that git is installed on my computer since heroku requires you to
use a repository in order to upload things to their server.
the first thing i'm going to do is list out my ruby on rails application.
in this listing you'll see the normal files and directories that you would see in any
ruby on rails application including the app folder, the rake file, the public folder,
and the log folder.
next i'm going to instantiate my git repository.
i'll then add these files to that repository. and make my very first commit.
you'll see then that git has added all of these files to the repository.
my next step is to create space on heroku to upload my particular ruby on rails application.
you'll see that heroku is creating the space for me and then supplies me with a url where
i can access my new ruby on rails application.
i'm then going to push my git repository to heroku.
this action uploads all of my files from the ruby on rails application into the space heroku
just created for me.
my last step is to create the database on heroku's servers.
this is a common ruby on rails command, the rake db:migrate command.
instead this time i add heroku to the beginning of that particular command.
you'll see that it creates the database and my application is now ready to be viewed.
i'm going to click on the my apps link, choose warm-sunset-41 and then click on that warm-sunset-41
link that we saw earlier after the heroku create command.
you'll notice that i am now at my ruby on rails application that i had listed out for
you earlier in this video.
i am able to use my application just as if it were on any server that may be at my particular
institution.
heroku provides a number of other services for their users including paying for larger
databases and personalized domain names.
with just a few simple commands, i was able to deploy my ruby on rails application using
heroku.