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

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

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

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

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

GitHub

GitHubは、Gitバージョン管理システムを利用したソフトウェア開発向けの共有ウェブサービスです。GitHub商用プランおよびオープンソースプロジェクト向けの無料アカウントを提供しています。

Q&A

解決済

2回答

379閲覧

git clone後のエラーについて

退会済みユーザー

退会済みユーザー

総合スコア0

Ruby on Rails 5

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

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

GitHub

GitHubは、Gitバージョン管理システムを利用したソフトウェア開発向けの共有ウェブサービスです。GitHub商用プランおよびオープンソースプロジェクト向けの無料アカウントを提供しています。

0グッド

1クリップ

投稿2018/10/23 14:21

AWSのcloud9で開発しています。githubに上がっているマスターのbranchをcloneして、cloud9にコピーしたのですが、rails sでサーバを起動すると、

(master) $ rails s Could not find proper version of railties (5.1.6) in any of the sources Run `bundle install` to install missing gems.

と表示されたので、bundle installしたら

$ bundle install Fetching gem metadata from https://rubygems.org/......... Fetching rake 12.3.1 Installing rake 12.3.1 Using concurrent-ruby 1.0.5 Fetching i18n 1.1.1 Installing i18n 1.1.1 Fetching minitest 5.11.3 Installing minitest 5.11.3 Using thread_safe 0.3.6 Using tzinfo 1.2.5 Fetching activesupport 5.1.6 Installing activesupport 5.1.6 Using builder 3.2.3 Using erubi 1.7.1 Using mini_portile2 2.3.0 Fetching nokogiri 1.8.5 Installing nokogiri 1.8.5 with native extensions Using rails-dom-testing 2.0.3 Using crass 1.0.4 Using loofah 2.2.2 Using rails-html-sanitizer 1.0.4 Fetching actionview 5.1.6 Installing actionview 5.1.6 Using rack 2.0.5 Using rack-test 1.1.0 Fetching actionpack 5.1.6 Installing actionpack 5.1.6 Using nio4r 2.3.1 Using websocket-extensions 0.1.3 Fetching websocket-driver 0.6.5 Installing websocket-driver 0.6.5 with native extensions Fetching actioncable 5.1.6 Installing actioncable 5.1.6 Using globalid 0.4.1 Fetching activejob 5.1.6 Installing activejob 5.1.6 Using mini_mime 1.0.1 Fetching mail 2.7.1 Installing mail 2.7.1 Fetching actionmailer 5.1.6 Installing actionmailer 5.1.6 Fetching activemodel 5.1.6 Installing activemodel 5.1.6 Fetching arel 8.0.0 Installing arel 8.0.0 Fetching activerecord 5.1.6 Installing activerecord 5.1.6 Fetching execjs 2.7.0 Installing execjs 2.7.0 Fetching autoprefixer-rails 9.2.1 Installing autoprefixer-rails 9.2.1 Fetching bcrypt 3.1.12 Installing bcrypt 3.1.12 with native extensions Fetching bindex 0.5.0 Installing bindex 0.5.0 with native extensions Fetching rb-fsevent 0.10.3 Installing rb-fsevent 0.10.3 Fetching ffi 1.9.25 Installing ffi 1.9.25 with native extensions Fetching rb-inotify 0.9.10 Installing rb-inotify 0.9.10 Fetching sass-listen 4.0.0 Installing sass-listen 4.0.0 Fetching sass 3.6.0 Installing sass 3.6.0 Fetching bootstrap-sass 3.3.7 Installing bootstrap-sass 3.3.7 Using bundler 1.16.5 Fetching byebug 9.0.6 Installing byebug 9.0.6 with native extensions Fetching coffee-script-source 1.12.2 Installing coffee-script-source 1.12.2 Fetching coffee-script 2.4.1 Installing coffee-script 2.4.1 Using method_source 0.9.0 Using thor 0.20.0 Fetching railties 5.1.6 Installing railties 5.1.6 Fetching coffee-rails 4.2.2 Installing coffee-rails 4.2.2 Fetching multi_json 1.13.1 Installing multi_json 1.13.1 Fetching jbuilder 2.6.4 Installing jbuilder 2.6.4 Fetching jquery-rails 4.3.1 Installing jquery-rails 4.3.1 Fetching ruby_dep 1.5.0 Installing ruby_dep 1.5.0 Fetching listen 3.1.5 Installing listen 3.1.5 Fetching pg 0.20.0 Installing pg 0.20.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /usr/local/rvm/gems/ruby-2.4.1/gems/pg-0.20.0/ext /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20181023-4880-16yg934.rb extconf.rb checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/rvm/rubies/ruby-2.4.1/bin/$(RUBY_BASE_NAME) --with-pg --without-pg --enable-windows-cross --disable-windows-cross --with-pg-config --without-pg-config --with-pg_config --without-pg_config --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib To see why this extension failed to compile, please check the mkmf.log which can be found here: /usr/local/rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/pg-0.20.0/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /usr/local/rvm/gems/ruby-2.4.1/gems/pg-0.20.0 for inspection. Results logged to /usr/local/rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/pg-0.20.0/gem_make.out An error occurred while installing pg (0.20.0), and Bundler cannot continue. Make sure that `gem install pg -v '0.20.0' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: pg

というエラーが出てしまったのですが、どうやって解決すればいいでしょうか。
自力で調べて、他の方がbrew install postgresqlで解決できていたみたいなのですが、私はこれで解決できませんでした。どなたかご教授お願いします。

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

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

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

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

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

guest

回答2

0

ベストアンサー

今、いけました。

gem install pg -v '0.20.0' --source 'https://rubygems.org/'を実行

エラー

yum install postgresql-develを実行

sudo su -を実行

yum install postgresql-devel を実行

exitで離脱

bundle install

で、自分はなんとかなりました

投稿2018/10/24 11:15

abc_kmlo

総合スコア19

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

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

0

gem install pg -v '0.20.0' --source 'https://rubygems.org/'
をしてみましたか?
(エラーメッセージの最後の方に書かれているコマンド)

投稿2018/10/23 14:41

編集2018/10/24 12:16
katoy

総合スコア22324

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

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

退会済みユーザー

退会済みユーザー

2018/10/24 03:59

すみません、それのやり方がわからないのですが教えていただけますと助かります
abc_kmlo

2018/10/24 10:39

自分も全く同じところで1日止まっています、、、
katoy

2018/10/24 12:17

ターミナルで gem install pg -v '0.20.0' --source 'https://rubygems.org/' と入力・実行してみてください。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問