LoginSignup
2
2

More than 5 years have passed since last update.

Mac(Snow Leopard) に ALMinium インストール

Last updated at Posted at 2013-02-18

CentOS6上で開発してたけど、移動中にローカルで開発したくなったので。
環境は、Mac OS X 10.6.8(Snow Leopard)
mysql は事前インストール済み。(多分 homebrew で入れたと思う)
他の環境が汚れる可能性もあるので注意。

まずは、ALMinium を clone してインストールスクリプト実行

% git clone git://github.com/alminium/alminium.git
% alminium
% ./smelt
% /opt/alminium
% rails s
Could not find gem 'pg (>= 0.11.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.

と怒られたので

% bundle install --path vendor/bundle

ログ取り忘れたけど、Rmagick がないとかどうとかだったので Imagemagick 追加。ついでに、_www グループに追加。(でもなんかユーザー変更したほうが楽っぽいので chown)

% brew install imagemagick
% sudo dscl . -append /Groups/_www GroupMembership suVene
% sudo chown -R suVene /opt/alminium

んで、

% bundle install

したら gem のインストールは無事終了。

% rails s -e development
=> Booting WEBrick
=> Rails 3.2.12 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/suVene/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:47:in `resolve_hash_connection': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
…

だったので(元々 Alminium は production で動かすようになインストーラのため)、

config/database.yml
% vim config/database.yml

で、development 用の設定を追加。(production をコピー)
あと mysql のユーザーも作成されてないっぽいので(mysql 最初から入ってたからかも?) mysql のユーザー作成

% mysql -u root -p
mysql> create database alminium;
mysql> create user alminium identified by 'alminium';
mysql> grant all privileges on alminium.* to alminium@'%' ;
mysql> quit;
% rake db:migrate RAILS_ENV=development
% % rake load_default_data RAILS_ENV=development

Select language: ar, bg, bs, ca, cs, da, de, el, en, en-GB, es, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] ja
====================================
Default configuration data loaded.

Note: The rake task load_default_data has been deprecated, please use the replacement version redmine:load_default_data
rake load_default_data RAILS_ENV=development  4.89s user 0.55s system 39% cpu 13.900 total
% 

これでブラウザから http://localhost:3000 でアクセスできるので、admin/admin でログイン後 admin のパスワードを変更するなり、他のシステムユーザを作って admin を削除するなりすれば完了。

、、、とおもいきや、Alminium でインストールされるべきプラグインが全然入ってない。
なんか、Alminium 側のインストーラに不具合あったんで pull request 送って対応(Merge済み)。

これで一応動いた。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2