8
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Middleman on Heroku

Last updated at Posted at 2013-03-21
  • インストール
gem install middleman
----------
Fetching: thor-0.15.4.gem (100%)
Successfully installed thor-0.15.4
Fetching: listen-0.7.3.gem (100%)
Successfully installed listen-0.7.3
Fetching: rb-fsevent-0.9.3.gem (100%)
Successfully installed rb-fsevent-0.9.3
Fetching: middleman-core-3.0.13.gem (100%)
Successfully installed middleman-core-3.0.13
Fetching: uglifier-1.2.7.gem (100%)
Successfully installed uglifier-1.2.7
Fetching: coffee-script-source-1.3.3.gem (100%)
Successfully installed coffee-script-source-1.3.3
Fetching: syntax-1.0.0.gem (100%)
Successfully installed syntax-1.0.0
Fetching: maruku-0.6.1.gem (100%)
Successfully installed maruku-0.6.1
Fetching: rack-protection-1.5.0.gem (100%)
Successfully installed rack-protection-1.5.0
Fetching: sinatra-1.3.6.gem (100%)
Successfully installed sinatra-1.3.6
Fetching: url_mount-0.2.1.gem (100%)
Successfully installed url_mount-0.2.1
Fetching: http_router-0.10.2.gem (100%)
Successfully installed http_router-0.10.2
Fetching: padrino-core-0.10.7.gem (100%)
Successfully installed padrino-core-0.10.7
Fetching: padrino-helpers-0.10.7.gem (100%)
Successfully installed padrino-helpers-0.10.7
Fetching: middleman-more-3.0.13.gem (100%)
Successfully installed middleman-more-3.0.13
Fetching: sprockets-sass-0.9.1.gem (100%)
Successfully installed sprockets-sass-0.9.1
Fetching: middleman-sprockets-3.0.9.gem (100%)
Successfully installed middleman-sprockets-3.0.9
Fetching: middleman-3.0.13.gem (100%)
Successfully installed middleman-3.0.13
Done installing documentation for thor, listen, rb-fsevent, middleman-core, uglifier, coffee-script-source, syntax, maruku, rack-protection, sinatra, url_mount, http_router, padrino-core, padrino-helpers, middleman-more, sprockets-sass, middleman-sprockets, middleman (0 sec).
18 gems installed
----------
  • 初期テンプレート生成
rbenv rehash
middleman init middleman_sample
----------
      create  middleman_sample/Gemfile
         run  bundle install --without development test from "."
Fetching gem metadata from http://rubygems.org/........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Using i18n (0.6.1) 
Using multi_json (1.7.1) 
Using activesupport (3.2.13) 
Using bundler (1.3.0) 
Using chunky_png (1.2.7) 
Using coffee-script-source (1.3.3) 
Using execjs (1.4.0) 
Using coffee-script (2.2.0) 
Using fssm (0.2.10) 
Using sass (3.2.7) 
Using compass (0.12.2) 
Using tilt (1.3.6) 
Using haml (4.0.1) 
Using hike (1.2.1) 
Using rack (1.4.5) 
Using url_mount (0.2.1) 
Using http_router (0.10.2) 
Using listen (0.7.3) 
Using syntax (1.0.0) 
Using maruku (0.6.1) 
Using rack-test (0.6.2) 
Using rb-fsevent (0.9.3) 
Using thor (0.15.4) 
Using middleman-core (3.0.13) 
Using rack-protection (1.5.0) 
Using sinatra (1.3.6) 
Using padrino-core (0.10.7) 
Using padrino-helpers (0.10.7) 
Using uglifier (1.2.7) 
Using middleman-more (3.0.13) 
Installing sprockets (2.4.5) 
Using sprockets-sass (0.9.1) 
Using middleman-sprockets (3.0.9) 
Using middleman (3.0.13) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
      create  middleman_sample/.gitignore
      create  middleman_sample/config.rb
      create  middleman_sample/source/index.html.erb
      create  middleman_sample/source/layouts/layout.erb
      create  middleman_sample/source/stylesheets
      create  middleman_sample/source/stylesheets/all.css
      create  middleman_sample/source/stylesheets/normalize.css
      create  middleman_sample/source/javascripts
      create  middleman_sample/source/javascripts/all.js
      create  middleman_sample/source/images
      create  middleman_sample/source/images/background.png
      create  middleman_sample/source/images/middleman.png
----------
  • サーバ起動
cd middleman_sample
middleman server
----------
WARN: Unresolved specs during Gem::Specification.reset:
      activesupport (~> 3.2.6)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
== The Middleman is loading
== The Middleman is standing watch at http://0.0.0.0:4567
----------

  • (ポート指定起動)
middleman server -p 5000
vi Gemfile
----------
# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'http://rubygems.org'
ruby "2.0.0"
 
gem "middleman", "~>3.0.13"
----------
vi Procfile
----------
web: bundle exec middleman build && middleman server -p $PORT
----------
git init && git add . && git commit -m "First commit"
heroku create middleman-sample
----------
Creating middleman-sample... done, stack is cedar
http://middleman-sample.herokuapp.com/ | git@heroku.com:middleman-sample.git
Git remote heroku added
----------
git push heroku master

8
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?