参考
github
https://github.com/cookpad/kuroko2
http://dev.classmethod.jp/server-side/kuroko2/
http://techlife.cookpad.com/entry/2015/12/07/195732
手順
rails new my_kuroko2 --database=mysql --skip-turbolinks --skip-javascript -m https://raw.githubusercontent.com/cookpad/kuroko2/master/app_template.rb
このテンプレートのままだとなんか失敗
手動で
bundle install
これも失敗
Bundler could not find compatible versions for gem "rails": In Gemfile: rails (= 4.2.6) kuroko2 was resolved to 0.2.0, which depends on rails (>= 5.0.0.1)
gemfileを編集してrailsを5にした
$ bundle exec rake db:create $ bundle exec rake db:migrate
動かすにはforemanってのが必要らしい
$ gem install foreman
その後、
$ foreman start
動かねえ
template.rbが途中でコケてるせいて、koruko2のマイグレーションが実行されてないせいだ
https://raw.githubusercontent.com/cookpad/kuroko2/master/app_template.rb
を見て、
$ bundle exec rake 'kuroko2:install:migrations’ $ bundle exec rake db:migrate
$ foreman start 略 .rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.3/lib/thor/base.rb:534:in `thor_reserved_word?': "run" is a Thor reserved word and cannot be defined as command (RuntimeError)
こんな感じで動かない
Gemfileにforemanいれてbundle execで動かしてみる
$ bundle exec foreman start
やっと立ち上がった
lcalhost:5000
がディフォルト