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

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

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

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

Ruby on Rails 6

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

MySQL

MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。

Amazon EC2

Amazon EC2は“Amazon Elastic Compute Cloud”の略称です。Amazon Web Services(AWS)の一部であり、仮想化されたWebサーバーのコンピュータリソースをレンタルできるサービスです。

Q&A

0回答

1122閲覧

EC2でのcannot load such file -- bundler/setupエラー

tom000

総合スコア2

Ruby

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

Ruby on Rails 6

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

MySQL

MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。

Amazon EC2

Amazon EC2は“Amazon Elastic Compute Cloud”の略称です。Amazon Web Services(AWS)の一部であり、仮想化されたWebサーバーのコンピュータリソースをレンタルできるサービスです。

0グッド

0クリップ

投稿2020/12/06 12:38

編集2020/12/07 14:51

現状

Railsで開発中のアプリをAWSを用いてデプロイしようと試みている段階です。
EC2でのMysqlの設定を終え、
rake db:create RAILS_ENV=production
をしたところ、タイトルのエラーが表示されてしまいます。

コード

$ sudo rake db:create RAILS_ENV=production Ignoring bcrypt-3.1.16 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.16 Ignoring bindex-0.8.1 because its extensions are not built. Try: gem pristine bindex --version 0.8.1 Ignoring bootsnap-1.4.8 because its extensions are not built. Try: gem pristine bootsnap --version 1.4.8 Ignoring byebug-11.1.3 because its extensions are not built. Try: gem pristine byebug --version 11.1.3 Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1 Ignoring kgio-2.11.3 because its extensions are not built. Try: gem pristine kgio --version 2.11.3 Ignoring msgpack-1.3.3 because its extensions are not built. Try: gem pristine msgpack --version 1.3.3 rake aborted! LoadError: cannot load such file -- bundler/setup /var/www/rails/kangolog/config/boot.rb:3:in `<top (required)>' /var/www/rails/kangolog/config/application.rb:1:in `require_relative' /var/www/rails/kangolog/config/application.rb:1:in `<top (required)>' /var/www/rails/kangolog/Rakefile:4:in `require_relative' /var/www/rails/kangolog/Rakefile:4:in `<top (required)>' /usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>' (See full trace by running task with --trace)
$ sudo rake db:create RAILS_ENV=production --trace Ignoring bcrypt-3.1.16 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.16 Ignoring bindex-0.8.1 because its extensions are not built. Try: gem pristine bindex --version 0.8.1 Ignoring bootsnap-1.4.8 because its extensions are not built. Try: gem pristine bootsnap --version 1.4.8 Ignoring byebug-11.1.3 because its extensions are not built. Try: gem pristine byebug --version 11.1.3 Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1 Ignoring kgio-2.11.3 because its extensions are not built. Try: gem pristine kgio --version 2.11.3 Ignoring msgpack-1.3.3 because its extensions are not built. Try: gem pristine msgpack --version 1.3.3 rake aborted! LoadError: cannot load such file -- bundler/setup /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require' /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require' /var/www/rails/kangolog/config/boot.rb:3:in `<top (required)>' /var/www/rails/kangolog/config/application.rb:1:in `require_relative' /var/www/rails/kangolog/config/application.rb:1:in `<top (required)>' /var/www/rails/kangolog/Rakefile:4:in `require_relative' /var/www/rails/kangolog/Rakefile:4:in `<top (required)>' /usr/share/gems/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load' /usr/share/gems/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load_rakefile' /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:703:in `raw_load_rakefile' /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:104:in `block in load_rakefile' /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling' /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:103:in `load_rakefile' /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:82:in `block in run' /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling' /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:80:in `run' /usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>' /bin/rake:23:in `load' /bin/rake:23:in `<main>'

試したこと

budler installをすれば解決するという記事が多かったので試しましたが、エラー分に変更はありませんでした。

補足

ruby version 2.6.6
rails version 6.0.3.4
Bundler version 1.17.2
EC2OS amazon-linux2

echo $GEM_PATH
を確認すべきと情報を得て、確認したのですが、
コマンドを入力してもなにも表示されません。
これが原因なのでしょうか?
調べてみたのですが、解決方法が見つけることができませんでした。

何かアドバイスなど頂けると幸いです。
よろしくお願い致します。

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

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

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

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

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

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問