Gitlab 読み (1)

手を染めてみることに。
とりあえずソース入手。

$ git clone https://github.com/gitlabhq/gitlabhq.git gitlab

で、ブランチなど確認するとか。

$ git branch -r
  origin/3-1-stable
  origin/4-0-stable
  origin/4-1-stable
  origin/HEAD -> origin/master
  origin/master
  origin/stable

ちょっと確認必要なんですがこんなことできるんですね (ナチュラル?

$ git checkout 4-1-stable
Branch 4-1-stable set up to track remote branch 4-1-stable from origin.
Switched to a new branch '4-1-stable'
$ git branch
* 4-1-stable
  master

中身確認します。

とりあえず

いくつか確認したい事項を以下に控え。

  • redis-server て何 (確認
  • sidekiq について確認

む、Gemfile 見てみるに Background なナニについては以下らしい。

# Background jobs
gem 'slim'
gem 'sinatra', :require => nil
gem 'sidekiq', '2.6.4'

それぞれ確認必要なのか。導入云々については doc/install/installation.md が更新されているようです。おそらくは /etc/init.d なスクリプトも更新されているはず。
とりあえず bundle install して rspec できるようにしておきたいと思います。

$ bundle install --without production

これも AWS な開発環境で云々したいなぁ。試験してみようかな。と gem の build でエラーが出ました。libicu-dev 入れれとのこと。ローカルで gitlab 云々は初めてのはずなので環境的に微妙なのかどうか、というよりもやはり開発用の仮想リソースって必要ですよね。つうかナチュラルにローカルが重くて嫌だ。
bundle install が無事に終わったら routes とか rspec とか確認したいがどうか。

正常終了?

以下な出力を確認。

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rails_best_practices:
********************************************************************************

  rails_best_practices is a code metric tool to check the quality of rails codes.

  I highly recommend you browse the Rails Best Practices website first.

      http://rails-bestpractices.com

  Please also try our online service

      http://railsbp.com

  Enjoy!

      Richard Huang (flyerhzm@gmail.com)

********************************************************************************

後で見てみよう。で、早速確認実施。

$ bundle exec rake routes

あ、database.yml を云々してませんでした。sqlite3 な以下でナニ。

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

で、rake routes リトライ。つうか 以下な準備が必要ですよね。

$ bundle exec rake db:migrate

で、rspec を fire できるのかどうなのか。あ、まだ駄目ですね。sqlite3 は範疇の外なので Gemfile に記述がない模様。activerecord-sqlite3-adapter を入れれ、と叱られました。やれやれ。

参った。うまく行かないですね。つうか gem search しても hit しないです。開発機で mysqlpostgresql 動かさなきゃ、なのか。ちょい手元のソレは微妙だったりするので試験動かしたりなどは別途ということにて。

config/routes.rb

ウサギィさんのソレを見つつ確認させて頂く方向で。