質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

0回答

1468閲覧

Ruby on Rails 環境構築質問

deliciousshingo

総合スコア0

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2020/07/01 05:04

前提・実現したいこと

プログラミング初心者の者です。
ruby on railsの環境構築の際、いつも同じところでエラーが出ます。

gemをインストールする際に下記のコードを実行
bundle install --path vendor/bundle

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
さらに
An error occurred while installing puma (4.3.5), and Bundler cannot
continue.
Make sure that gem install puma -v '4.3.5' --source 'https://rubygems.org/'
succeeds before bundling.

と表示されます。
ググって色々試したのですが、、解決できません。

アドバイスお願いします。よろしくお願いします。

発生している問題・エラーメッセージ

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/shingohata/cooklog/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/ext/puma_http11
/Users/shingohata/.rbenv/versions/2.6.3/bin/ruby -I
/Users/shingohata/.rbenv/versions/2.6.3/lib/ruby/2.6.0 -r
./siteconf20200701-95158-1fpziyo.rb extconf.rb
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
checking for openssl/bio.h... yes
checking for DTLS_method() in openssl/ssl.h... yes
checking for TLS_server_method() in openssl/ssl.h... yes
checking for SSL_CTX_set_min_proto_version in openssl/ssl.h... yes
creating Makefile

current directory:
/Users/shingohata/cooklog/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/ext/puma_http11
make "DESTDIR=" clean

current directory:
/Users/shingohata/cooklog/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/ext/puma_http11
make "DESTDIR="
compiling http11_parser.c
ext/puma_http11/http11_parser.c:44:18: warning: unused variable
'puma_parser_en_main' [-Wunused-const-variable]
static const int puma_parser_en_main = 1;
^
1 warning generated.
compiling io_buffer.c
compiling mini_ssl.c
mini_ssl.c:145:7: warning: unused variable 'min' [-Wunused-variable]
int min, ssl_options;
^
mini_ssl.c:299:40: warning: function 'raise_error' could be declared with
attribute 'noreturn' [-Wmissing-noreturn]
void raise_error(SSL* ssl, int result) {
^
2 warnings generated.
compiling puma_http11.c
puma_http11.c:203:22: error: implicitly declaring library function 'isspace'
with type 'int (int)' [-Werror,-Wimplicit-function-declaration]
while (vlen > 0 && isspace(value[vlen - 1])) vlen--;
^
puma_http11.c:203:22: note: include the header <ctype.h> or explicitly provide a
declaration for 'isspace'
1 error generated.
make: *** [puma_http11.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/Users/shingohata/cooklog/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5 for
inspection.
Results logged to
/Users/shingohata/cooklog/vendor/bundle/ruby/2.6.0/extensions/x86_64-darwin-19/2.6.0/puma-4.3.5/gem_make.out

An error occurred while installing puma (4.3.5), and Bundler cannot
continue.
Make sure that gem install puma -v '4.3.5' --source 'https://rubygems.org/'
succeeds before bundling.

該当のソースコード

ソースコード

試したこと

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

winterboum

2020/07/01 05:43

Results logged to /Users/shingohata/cooklog/vendor/bundle/ruby/2.6.0/extensions/x86_64-darwin-19/2.6.0/puma-4.3.5/gem_make.out とあります。 そのlogを確認してください。たいてい一番最後の方に、どうしたらよいかという助言が書かれています
deliciousshingo

2020/07/01 06:21

回答ありがとうございます! 確認したら下のほうにエラーの文字がありました。これが原因なんでしょうか? have_macro: checking for SSL_CTX_set_min_proto_version in openssl/ssl.h... -------------------- yes "clang -I/Users/shingohata/.rbenv/versions/2.6.3/include/ruby-2.6.0/x86_64-darwin19 -I/Users/shingohata/.rbenv/versions/2.6.3/include/ruby-2.6.0/ruby/backward -I/Users/shingohata/.rbenv/versions/2.6.3/include/ruby-2.6.0 -I. -I/Users/shingohata/.rbenv/versions/2.6.3/openssl/include -I/Users/shingohata/.rbenv/versions/2.6.3/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -fno-common -pipe -c conftest.c" checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <openssl/ssl.h> 4: /*top*/ 5: #ifndef SSL_CTX_set_min_proto_version 6: # error 7: |:/ === SSL_CTX_set_min_proto_version undefined === /:| 8: #endif /* end */
winterboum

2020/07/01 09:01

いや、これはcheckでつかったprogramのソースですから違いますね。 もっと後かと
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問