Post date: 2014/03/26 13:55:50
1. Stacked Gitというツールをhttp://www.procode.org/stgit/ からダウンロード
インストールは、展開して、以下でOK
make prefix=/usr/local/anagix_tools all doc
make prefix=/usr/local/anagix_tools install
これで、stgというコマンドが使えるようになる
2. https://github.com/Hobo/agility-gitorial-patches のREADMEに書いてあるように以下を実行する:
git clone git://github.com/Hobo/agility-gitorial-patches.git
cd agility-gitorial-patches
mkdir agility-gitorial
cd agility-gitorial
git init
touch README
git add README
git commit --cleanup=verbatim -m ""
stg init
stg import -i --reject -s ../series
これで、agility-gitorial-patches/agility-gitorial ができる
3. hobo2.0.0+Rails3.2で動かす
a.agility-gitorial/Gemfileはhobo2.0.0pre8用なので、hobo2.0.0用に変更するついでにrailsも3.2最新版に
< gem 'rails', '3.2.11' --- > gem 'rails', '3.2.17'
< gem 'jquery-rails' --- > gem 'jquery-rails', '~> 2.0'
< gem "hobo", "= 2.0.0.pre8" --- > gem "hobo", "= 2.0.0"
hobo_bootstrap,hobo_jquery_ui,hobo_bootstrap_uiも同様
b. bundle install
c. bundle exec rake db:migrate
d. rails sで正常動作する
4. hobo2.1 + Rails4で動かす
a. hobo2.1が作るGemfileを参考に以下の\ように hobo2.1.0とrails 4.0.3に変更する
< gem 'rails', '3.2.17'---> gem 'rails', '4.0.3'
< gem 'sass-rails', '~> 3.2.3'---> gem 'sass-rails', '~> 4.0.0'
< gem 'coffee-rails', '~> 3.2.1'---> gem 'coffee-rails', '~> 4.0.0'
< gem 'uglifier', '>= 1.0.3'---> gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails', '~> 2.0' の'~> 2.0'を削除
gem 'turbolinks' 追加
> # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
> gem 'jbuilder', '~> 1.2'
> gem 'debugger'
< gem "hobo", "= 2.0.0"---> gem "hobo", "= 2.1.0"
< gem "will_paginate", :git => "git://github.com/Hobo/will_paginate.git"
--> gem "hobo_will_paginate" に変更
< gem "hobo_bootstrap", "2.0.0"---> gem "hobo_bootstrap", "2.1.0"
< gem "hobo_jquery_ui", "2.0.0"---> gem "hobo_jquery_ui", "2.1.0"
< gem "hobo_bootstrap_ui", "2.0.0"---> gem "hobo_bootstrap_ui", "2.1.0"
b. config/routes.rbをhobo2.1が作成するものに変更する
rails3.2では、matchを使っていたが、rails4では、get/postを使う
config/hobo_routes.rbは変更の必要はない
c. Agility に必要な変更
1。app/views/projects/show.drymlで、filter-menuのoptionsを変更
&StoryStatus.all ーー> &StoryStatus.all.to_a
もしかしたらhobo2.1のバグかも知れないが、hobo2.0+rails3.2では、
StoryStatus.all.class は、Arrayであったのに対し、hobo2.1+rails4では、ActiveRecord::Relation::ActiveRecord_Relation_StoryStatusが帰る
そのため、この修正をしないと以下のエラーが出力される:
ActionView::Template::Error (You must provide an "options" attribute, or set "activerecord.attributes..filter_menu.status.options" or "tags.filter_menu.status.options" to an Array or to an Array of pairs in your locale file(s)):