Skip to content

Instantly share code, notes, and snippets.

@kfly8
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kfly8/10707513 to your computer and use it in GitHub Desktop.
Save kfly8/10707513 to your computer and use it in GitHub Desktop.
もばこんの下準備するよー #もばこん

heroku ruby hello world

~/project/mobacon-pre (master) tree -L 1
.
├── Gemfile
├── Gemfile.lock
├── Procfile
├── vendor
└── web.rb
~/project/mobacon-pre (master) cat web.rb
require 'sinatra'

get '/' do
      "Hello, world"
end
~/project/mobacon-pre (master) cat Procfile
web: bundle exec ruby web.rb -p $PORT
~/project/mobacon-pre (master) cat Gemfile
source "https://rubygems.org"
ruby "2.0.0"
gem 'sinatra', '1.1.0'
~/project/mobacon-pre foreman start
16:19:30 web.1  | started with pid 59906
16:19:31 web.1  | [2014-04-15 16:19:31] INFO  WEBrick 1.3.1
16:19:31 web.1  | [2014-04-15 16:19:31] INFO  ruby 2.0.0 (2013-06-27) [universal.x86_64-darwin13]
16:19:31 web.1  | [2014-04-15 16:19:31] INFO  WEBrick::HTTPServer#start: pid=59906 port=5000
git init
git add .
git commit 
~/project/mobacon-pre (master) heroku apps:create mobacon-pre-sample
Creating mobacon-pre-sample... done, stack is cedar
http://mobacon-pre-sample.herokuapp.com/ | git@heroku.com:mobacon-pre-sample.git
Git remote heroku added
~/project/mobacon-pre (master) git push heroku master                      [21/1673]
Saving password to keychain failed
Identity added: /Users/kfly8/.ssh/id_rsa (/Users/kfly8/.ssh/id_rsa)
Initializing repository, done.
Counting objects: 396, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (331/331), done.
Writing objects: 100% (396/396), 846.57 KiB | 321.00 KiB/s, done.
Total 396 (delta 34), reused 0 (delta 0)

-----> Ruby app detected                                                   [11/1673]
-----> Compiling Ruby/Rack
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.5.2
       New app detected loading default bundler cache
       Running: bundle install --without development:test --path vendor/bundle --bin
stubs vendor/bundle/bin -j4 --deployment
       Fetching gem metadata from https://rubygems.org/..........
       Fetching additional metadata from https://rubygems.org/..
       Using rack (1.5.2)
       Using tilt (1.4.1)
       Using bundler (1.5.2)
       Installing sinatra (1.1.0)
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Bundle completed (6.05s)
       Cleaning up the bundler cache.
       
       -----> WARNINGS:
       Removing `vendor/bundle`.
       Checking in `vendor/bundle` is not supported. Please remove this directory
       and add it to your .gitignore. To vendor your gems with Bundler, use
       `bundle pack` instead.
-----> Discovering process types
       Procfile declares types -> web
       Default types for Ruby  -> console, rake

-----> Compressing... done, 11.9MB
-----> Launching... done, v4
       http://mobacon-pre-sample.herokuapp.com/ deployed to Heroku

To git@heroku.com:mobacon-pre-sample.git
 * [new branch]      master -> master

http://mobacon-pre-sample.herokuapp.com/

2014-04-15 16:00 - 18:00

やること

もばこんの下ごしらえ!!

  • heroku で Hello World (好きな言語でよろ)
  • heroku で Perl Hello World
  • heroku で MySQL Hello World
  • heroku で Amon2動かしたWebアプリつくってみてちょ

先に言っておきたいことがある

自分でドキュメント読んでやって!(x準備不足

参考

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment