前提・実現したいこと
初めての質問投稿で至らない点が多いと思われますが、成長の為ご指摘頂ければ幸いです。
railsを使ってアプリケーションを作成しています。
AWSを使いデプロイを行うのが目的です。
本番環境でgemを管理する為のbundlerをインストールしてbundle installを実行するとターミナルにエラーが表示されましたので、解決したいです。
発生している問題・エラーメッセージ
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. An error occurred while installing sassc (2.4.0), and Bundler cannot continue. Make sure that `gem install sassc -v '2.4.0' --source 'https://rubygems.org/'` succeeds before bundling.
該当のソースコード
[ec2-user@ip-172-31-44-8 songs_search]$ gem install bundler -v 2.1.4 Successfully installed bundler-2.1.4 Parsing documentation for bundler-2.1.4 Done installing documentation for bundler after 3 seconds 1 gem installed [ec2-user@ip-172-31-44-8 songs_search]$ bundle install Your Gemfile lists the gem unicorn (= 5.4.1) more than once. You should probably keep only one of them. Remove any duplicate entries and specify the gem only once. While it's not a problem now, it could cause errors if you change the version of one of them later. The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. Fetching gem metadata from https://rubygems.org/............ Using rake 13.0.1 Using concurrent-ruby 1.1.6 Using i18n 1.8.3 Using minitest 5.14.1 Using thread_safe 0.3.6 Using tzinfo 1.2.7 Using activesupport 5.0.7.2 Using builder 3.2.4 Using erubis 2.7.0 Using mini_portile2 2.4.0 Using nokogiri 1.10.10 Using rails-dom-testing 2.0.3 Using crass 1.0.6 Using loofah 2.6.0 Using rails-html-sanitizer 1.3.0 Using actionview 5.0.7.2 Using rack 2.2.3 Using rack-test 0.6.3 Using actionpack 5.0.7.2 Using nio4r 2.5.2 Using websocket-extensions 0.1.5 Using websocket-driver 0.6.5 Using actioncable 5.0.7.2 Using globalid 0.4.2 Using activejob 5.0.7.2 Using mini_mime 1.0.2 Using mail 2.7.1 Using actionmailer 5.0.7.2 Using active_hash 3.1.0 Using arbre 1.2.1 Using formtastic 3.1.5 Using formtastic_i18n 0.6.0 Using has_scope 0.7.2 Using method_source 1.0.0 Using thor 1.0.1 Using railties 5.0.7.2 Using responders 3.0.1 Using inherited_resources 1.11.0 Using jquery-rails 4.4.0 Using kaminari-core 1.2.1 Using kaminari-actionview 1.2.1 Using activemodel 5.0.7.2 Using arel 7.1.4 Using activerecord 5.0.7.2 Using kaminari-activerecord 1.2.1 Using kaminari 1.2.1 Using polyamorous 2.3.0 Using ransack 2.3.0 Using ffi 1.13.1 Fetching sassc 2.4.0 Installing sassc 2.4.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/ec2-user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sassc-2.4.0/ext /home/ec2-user/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20200712-23513-8torcj.rb extconf.rb creating Makefile current directory: /home/ec2-user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sassc-2.4.0/ext make "DESTDIR=" clean current directory: /home/ec2-user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sassc-2.4.0/ext make "DESTDIR=" compiling ./libsass/src/ast.cpp compiling ./libsass/src/ast2c.cpp compiling ./libsass/src/ast_fwd_decl.cpp compiling ./libsass/src/ast_sel_cmp.cpp compiling ./libsass/src/ast_sel_super.cpp compiling ./libsass/src/ast_sel_unify.cpp compiling ./libsass/src/ast_sel_weave.cpp compiling ./libsass/src/ast_selectors.cpp virtual memory exhausted: メモリを確保できません make: *** [ast_selectors.o] エラー 1 make failed, exit code 2 Gem files will remain installed in /home/ec2-user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sassc-2.4.0 for inspection. Results logged to /home/ec2-user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0/sassc-2.4.0/gem_make.out An error occurred while installing sassc (2.4.0), and Bundler cannot continue. Make sure that `gem install sassc -v '2.4.0' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: activeadmin was resolved to 2.4.0, which depends on sassc-rails was resolved to 2.1.2, which depends on sassc [ec2-user@ip-172-31-44-8 songs_search]$ client_loop: send disconnect: Broken pipe
試したこと
ローカルのBundler version 2.1.4で同じでした。
エラー文を調べては見ましたが、内容が読み取れず何を試したら良いか分からない状態です。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/07/12 11:50
2020/07/12 11:51