2016年3月27日日曜日

Docker公式RedmineコンテナにRedmine Backlogsプラグインをインストールする。

Redmine Backlogsプラグインの公式ページ手順(http://www.redminebacklogs.net/en/installation.html)どおりに進めると失敗する。

失敗する実行コマンドは以下のコマンド
bundle install --without development test

エラーログは以下
Building native extensions.  This could take a while...
ERROR:  Error installing eventmachine:
        ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/eventmachine-1.2.0.1/ext
/usr/local/bin/ruby -r ./siteconf20160327-245-19iokhx.rb extconf.rb
checking for main() in -lcrypto... *** extconf.rb failed ***


手順の最初でいきなりつまずくw

ログを見るとcryptoというライブラリが不足しているらしい。

Docker公式RedmineコンテナはDebian Jessieベースで作成されているので、パッケージのページ(https://packages.debian.org/ja/jessie/libssl-dev)を見てみる。
libcrypto.soはlibssl-devパッケージに含まれており、すでにインストールされている。

makeファイルを作成する /usr/local/bundle/gems/eventmachine-1.2.0.1/ext/extconf.rb を読むとOpenSSLのバージョンは1.0.2eでないといけないらしい。(Debian Jessieは1.0.1kがインストールされている)

これを解決しようと思うとOpenSSLの入れ替えが必要なので、Docker公式Redmineを使用するのは諦めることにする。

2016年3月20日日曜日

Windowsのコマンドプロンプトでボリュームを移動

いつも忘れるので。
Dボリュームに移動。
覚えると意外と簡単。

 OK: D:
NG: cd D:

DBFluteのハンズオンでmysqlの初期化ができない(windows)

Mac用のコマンドは書いてあったけど、Windows用のコマンドは書いてなかったので記述。
http://dbflute.seasar.org/ja/tutorial/handson/section01.html#mysql

Windowsの場合、Macと同様のコマンドで実行できるがroot権限が必要。
root権限がないと以下のエラーが出ます。

>mysqld: Could not create or access the registry key needed for the MySQL application
to log to the Windows EventLog. Run the application with sufficient
privileges once to create the key, add the key manually, or turn off
logging for that application.