redmineをmacにインストールしてみた 2日目

10.6用のインストールに関してこんなことが書いてあったけど

Install Phusion Passenger
This is a gem that handles Ruby on Rails applications and makes them accessible on the web server.
sudo gem install passenger
sudo passenger-install-apache2-module
The apache2 module installation will ask you to add several lines to the apache configuration file. For the standard Lion Server, the file is /etc/apache2/httpd.conf . Typical lines to add are:
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-3.0.12
PassengerRuby /System/Library/Frameworks/Ruby.framework/Version/1.8/usr/bin/ruby@

It may also be helpful to specify the user that runs passenger, with the line
PassengerDefaultUser www
Build and install Passenger Pref Pane
This is a GUI interface for the Mac, to make it easy to add Ruby on Rails applications. Many of the binary prefPanes on the web are not compatible with 10.7, so it is necessary to build :
cd ~/Downloads
git clone https://github.com/Fingertips/passengerpane/
cd passengerpane
xcodebuild
(If you can’t find xcodebuild, it may be in /usr/bin/xcodebuild)
Install the preference pane. Look in ~/Downloads/passengerpane/build/Release, and double-click on Passenger.prefPane to install it.
An alternative is to download a pre-compiled build for 10.7, e.g. SoftwhisperSL-PassengerPrefPane

Redmine 1.4からは不要になっているみたい
そのかわり
bundlerをインストールするらしい

gem install bundler

問題なくインストール完了

いよいろRedmineのインストール

最新版をダウンロード

svn checkout http://svn.redmine.org/redmine/branches/2.3-stable redmine

ダウンロードしたディレクトリに移動

cd redmine

ls を実行すると
.gitignore .svn README.rdoc app config.ru doc files log public test vendor
.hgignore Gemfile Rakefile config db extra lib plugins script tmp

こんな感じらしい

bundle install –without development test postgresql sqlite
を実行したところ mysql2 が足りなと言われたので追加

gem install mysql2 — –with-opt-include=/usr/local/mysql/include –with-opt-lib=/usr/local/mysql/lib

必要なインストールが実行されて最後に
Your bundle is complete!
Gems in the groups development and test were not installed.
Use bundle show [gemname] to see where a bundled gem is installed.

MySQL Workbenchで
create database redmine character set utf8;
create user ‘redmine’@’localhost’ identified by ‘my_password';
grant all privileges on redmine.* to ‘redmine’@’localhost';

を実行
config内のファイルをコピー
cp database.yml.example database.yml

設定ファイルを変更
vi database.yml

セッションストア秘密鍵を生成
rake generate_secret_token

データベース上にテーブルを作成
RAILS_ENV=production rake db:migrate
おっとエラーがでたので
vi config/database.yml を修正して再実行
今度は成功

デフォルトデータをデータベース
RAILS_ENV=production rake redmine:load_default_data
言語を聞かれるので素直に日本語 ja を選択

Redminを実行するユーザーは次のディレクトリに対して書き込み権限が必要
なので
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets

するみたい

ruby script/rails server webrick -e production

を実行してブラウザで

http://localhost:3000/

にアクセスすると

スクリーンショット 2013-09-13 6.42.40

無事成功!!!

Subscribe to Kentaro

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe