TeamTrickをUbuntuで動かしてみました
TeamTrickというRails製のプロジェクト管理アプリケーションを動かしてみました。
Scrumプロジェクトの管理ツールということで興味を持ったのでとりあえず使ってみようと思い立ちました。
データベースはmysqlを利用しました。
railsのバージョンは2.3.5らしく、そこからいろいろとつまずいたので、
作業ログを残しておきます。
$ git clone git://github.com/manuelmorales/teamtrick.git Initialized empty Git repository in /var/www/rails/TeamTrick/teamtrick/.git/ remote: Counting objects: 2026, done. remote: Compressing objects: 100% (1512/1512), done. remote: Total 2026 (delta 573), reused 1784 (delta 459) Receiving objects: 100% (2026/2026), 3.83 MiB | 312 KiB/s, done. Resolving deltas: 100% (573/573), done.
database.ymlをoriginalファイルからコピーして編集します。
$ cp config/database.original config/database.yml $ vim config/database.yml ・・・略 development: adapter: mysql database: teamtrick_development username: root password: encoding: UTF8 ・・・略
このような感じでsqlite3ではなく、mysqlを利用するように変更します。
DBを作成します。
$ RAILS_ENV=development rake db:create (in /var/www/rails/TeamTrick/teamtrick) Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
ここで、Railsのバージョンが古かったため、2.3.5のインストールが促されました。
$ sudo gem install -v=2.3.5 rails
再度db:createを実行すると、今度は、mysqlをgemでinstallしろとのこと。
$ sudo gem install mysql Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb install mysql checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... noこんなエラーが発生。mysqlのlibが足りていなかったりするみたい。 ということで、インストール。extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/ruby --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib --with-mlib --without-mlib --with-mysqlclientlib --without-mysqlclientlib --with-zlib --without-zlib --with-mysqlclientlib --without-mysqlclientlib --with-socketlib --without-socketlib --with-mysqlclientlib --without-mysqlclientlib --with-nsllib --without-nsllib --with-mysqlclientlib --without-mysqlclientlib Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection. Results logged to /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out$ sudo apt-get install libmysqlclient15-devmysqlのconfigの場所も指定して再度installを実行$ sudo gem install mysql -- --with-mysql-configなんとか入りました。 db:createにも成功!$ RAILS_ENV=development rake db:createでは、次にmigrateを実施。$ RAILS_ENV=development rake db:migrate (in /var/www/rails/TeamTrick/teamtrick) Missing these required gems: calendar_date_select faker populator sqlite3-ruby You're running: ruby 1.8.7.72 at /usr/local/bin/ruby rubygems 1.3.4 at /home/daisuke/.gem/ruby/1.8, /usr/local/lib/ruby/gems/1.8 Run `rake gems:install` to install the missing gems.とまたエラーが発生・・・ gemで足りないものがいっぱいあるよう。 足りないものをインストール。$ sudo gem install calendar_date_select $ sudo gem install faker $ sudo gem install populator $ sudo gem install sqlite3-rubysqlite3-rubyのインストールに失敗。 今度は、sqlite3のライブラリが不足している。$ sudo apt-get install libsqlite3-dev $ sudo gem install sqlite3-rubyということで、ライブラリをインストールして、無事sqlite3-rubyのインストールに成功。$ RAILS_ENV=development rake db:migratemigrateも無事成功。 あとは、サーバを起動。$ RAILS_ENV=development ruby ./script/server -p 3000http://ホスト名:3000/にアクセスするとこのような画面になります。 アカウントを登録して、進むとマイページに。 今日は、ここまで。 次は、実際に使ってみたいと思います。