Help us understand the problem. What is going on with this article?

El Capitanで Rails5 betaでRails app作ろうとしたら、gem eventmachineのインストールで怒られた件。。

More than 3 years have passed since last update.

各環境

  • Mac El Capitan
  • ruby version 2.2.3
  • rails version 5.0.0.beta1

やったこと

Rubyのバージョン指定
Gemfile生成・編集

$ echo 2.2.3 > .ruby-version
$ bundle init
$ vi Gemfile
source "https://rubygems.org"

gem 'rails', '5.0.0.beta1', github: 'rails/rails'

bundle install --path vendor/bundle

怒られる・・
ここのエラーメッセージコピーし忘れたんだけど、

Ruby2.2.0にupdateしてbundle installしたらAn error occurred while installing eventmachine (1.0.3)とか言われた - Qiita

で発生してたのと同じような状況だったので。。

$ bundle update

してみた。

Installing eventmachine 1.0.8 with native extensions
...
In file included from binder.cpp:20:
./project.h:116:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
         ^
1 error generated.
make: *** [binder.o] Error 1

make failed, exit code 2

;;
何かさらにエラーが・・・

解決策:ERROR: Failed to build gem native extension · Issue #643 · eventmachine/eventmachine

めっちゃテキトーにまとめると、

El Capitan には OpenSSL headers がもう含まれていないので、brewでインストール&リンクしてね。

とのこと。

$ brew install openssl
$ brew link openssl --force

してから、もう一度 bundle update したらOK.

試してみたかったのはコレ
Rails 5: Action Cable demo - YouTube

heartrails
ハートレイルズは、新規事業の立ち上げに伴うウェブサービス、スマホアプリの企画、開発、運用に特化した開発会社です。
http://www.heartrails.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした