■
しょうがないので Hello World から。
>gem install rubygems-update
>update_rubygems
>gem install rack bundler sinatra
web.rb - プログラムの本体
require 'rubygems'
require 'sinatra'
get '/' do
'hello, world'
end
config.ru - Rackの起動設定
require './web.rb'
run Sinatra::Application
Gemfile - bundlerを使ったGem管理の設定
source :rubygems
gem 'sinatra'
>bundle install
>git init
>git add .
>git commit -m "Initial commit"
>heroku login
>heroku create p95095yy20120711
>git push heroku master
! Invalid path.
! Syntax is: git@heroku.com:
fatal: The remote end hung up unexpectedly
>git push git@heroku.com:p95095yy20120711.git master
>heroku open
! No app specified.
! Run this command from an app folder or specify which app to use with --app
>heroku open --app p95095yy20120711
Opening http://p95095yy20120711.herokuapp.com/
>git remote add heroku git@heroku.com:gentle-stone-6910.git
(先にheroku createより先にgit initしておかないとエラーになる)
>heroku open