Hello World from OSS Silicon Valley


HowToUse/RubyOnRails/4.2/Heroku/2015


_ Prerequisite

_ Install&Setup

Step.1
Access to Heroku's web site.
CreateAccount_fig1.png
Step.2
Login the system.
CreateAccount_fig2.png
CreateAccount_fig3.png
Step.3
Click the Ruby's icon, and you will see the instruction how to install Heroku Toolbelt.
CreateAccount_fig4.png
Step.4
Execute the following commands.
$ gem install bundler
Step.5
Download Heroku Toolbelt from the link in web page.

_ HowToUse

Step.1
Login to Heroku server.
$ heroku login
Step.2
Prepare sample project from GitHub.
$ git clone https://github.com/heroku/ruby-getting-started.git
$ cd ruby-getting-started
Step.3
Create new project in Heroku space.
$ heroku create
Step.4
Deploy the sample project to Heroku server.
$ git push heroku master
Step.5
Launch instance.
$ heroku open
Step.6
Check server log.
$ heroku logs --tail
Step.6
Enter Ctrl-C, and define Procfile.
$ vi Procfile
web: bundle exec puma -C config/puma.rb
Step.7
Check how many dynos is launched.
$ heroku ps
Step.8
Execute the bundle install
$ bundle install
Step.9
Run the application locally.
$ bundle exec rake db:create db:migrate

:Step.10 Create/migrate database.

$ rake db:create db:migrate

:Step.11 Launch local instance.

$ heroku local web

Then you can access to http://localhost:5000/

_ Author

S.Yatsuzuka