MacでRubyのeventmachine絡みのエラー

MacでRubyのeventmachine絡みでエラーが↓。

An error occurred while installing eventmachine (1.0.5), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.5'` succeeds before bundling.

ちょっと遡ってみてみると、
compiling rubymain.cpp
compiling ssl.cpp
linking shared-object rubyeventmachine.bundle

make "DESTDIR=" install
make: /opt/local/bin/gmkdir: No such file or directory
make: *** [.RUBYARCHDIR.time] Error 1

make install failed, exit code 2

gmkdirがないよ!という話らしいです。

homebrewで入れます↓

$ brew install coreutils
$ gmkdir --version
mkdir (GNU coreutils) 8.25
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.

↓入りました。再度挑戦↓

$ bundle install

~中略~

compiling ssl.cpp
linking shared-object rubyeventmachine.bundle

make "DESTDIR=" install
make: /opt/local/bin/gmkdir: No such file or directory
make: *** [.RUBYARCHDIR.time] Error 1

make install failed, exit code 2

~中略~

↑まだgmkdirがないみたいです。というかなぜ/opt/local/bin/gmkdirを叩いているのでしょうか。自分の環境がmacportsから移行してhomebrewを使っている影響でしょうか???というわけでシンボリックリンクを張って↓対処します。rbenv再インストールで直るのではとか思うのですが。

$ sudo mkdir -p /opt/local/bin
$ sudo ln -s /usr/local/bin/gmkdir /opt/local/bin/gmkdir
$ sudo ln -s /usr/local/bin/ginstall /opt/local/bin/ginstall 

↑これでいいはずです。やってみます↓

$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...

中略

Installing eventmachine 1.0.5 with native extensions

中略

Bundle complete! 11 Gemfile dependencies, 20 gems now installed.

無事行けました!!!

Bookmark the permalink.

Comments are closed.