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

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

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

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

Q&A

0回答

1264閲覧

Ruby on Rails 環境構築した際bundle install ができない

komata

総合スコア0

Ruby on Rails

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

0グッド

0クリップ

投稿2020/08/30 22:25

Ruby on Rails での環境構築をvagrantでやりましてwebサーバー立ち上げの直前でつまづきました。vagrant/ruby_lessons/myappまでいきサーバー立ち上げするためローカルホストの番号を入力したのですができませんでした。その後bundle installをしようとしたのですがエラー表記が出ました。エラーの表記が出ていてそれを調べながらやってるんですができません。どなたか教えていただけると嬉しいです。
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/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 13.0.1
Using concurrent-ruby 1.1.7
Using i18n 1.8.5
Using minitest 5.14.1
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using activesupport 5.2.4.3
Using builder 3.2.4
Using erubi 1.9.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.7.0
Using rails-html-sanitizer 1.3.0
Using actionview 5.2.4.3
Using rack 2.2.3
Using rack-test 1.1.0
Using actionpack 5.2.4.3
Using nio4r 2.5.2
Using websocket-extensions 0.1.5
Using websocket-driver 0.7.3
Using actioncable 5.2.4.3
Using globalid 0.4.2
Using activejob 5.2.4.3
Using mini_mime 1.0.2
Using mail 2.7.1
Using actionmailer 5.2.4.3
Using activemodel 5.2.4.3
Using arel 9.0.0
Using activerecord 5.2.4.3
Using mimemagic 0.3.5
Using marcel 0.3.3
Using activestorage 5.2.4.3
Using public_suffix 4.0.5
Using addressable 2.7.0
Using bindex 0.8.1
Using msgpack 1.3.3
Using bootsnap 1.4.8
Using bundler 2.1.4
Using byebug 11.1.3
Using regexp_parser 1.7.1
Using xpath 3.2.0
Using capybara 3.33.0
Using childprocess 3.0.0
Using ffi 1.13.1
Using jbuilder 2.10.0
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using listen 3.2.1
Using method_source 1.0.0
Using puma 4.3.5
Using rack-proxy 0.6.5
Using thor 1.0.1
Using railties 5.2.4.3
Using sprockets 4.0.2
Using sprockets-rails 3.2.1
Using rails 5.2.4.3
Using rubyzip 2.3.0
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/vagrant/ruby_lessons/myapp/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext
/home/vagrant/.rbenv/versions/2.6.5/bin/ruby -I
/home/vagrant/.rbenv/versions/2.6.5/lib/ruby/2.6.0 -r
./siteconf20200830-20475-obrtlc.rb extconf.rb
creating Makefile

current directory:
/home/vagrant/ruby_lessons/myapp/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext
make "DESTDIR=" clean

current directory:
/home/vagrant/ruby_lessons/myapp/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext
make "DESTDIR="
compiling ./libsass/src/ast.cpp
cc1plus: error: unrecognized command line option "-std=c++11"
make: *** [ast.o] エラー 1

make failed, exit code 2

Gem files will remain installed in
/home/vagrant/ruby_lessons/myapp/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0 for
inspection.
Results logged to
/home/vagrant/ruby_lessons/myapp/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.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:
sass-rails was resolved to 6.0.0, which depends on
sassc-rails was resolved to 2.1.2, which depends on
sassc

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

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

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

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

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

kazto

2020/08/31 02:23

Gemfileの内容をご提示おねがいします。 エラー文を見た感じ、古いパッケージバージョンを指定してしまって、依存関係を解決できない状態になっているようです。
komata

2020/08/31 13:16

source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.6.5' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2.1', '~> 5.2.4.3' # Use sqlite3 as the database for Active Record gem 'sqlite3', '~> 1.3.6' # Use Puma as the app server gem 'puma', '~> 4.1' # Use SCSS for stylesheets gem 'sass-rails', '>= 6' # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker gem 'webpacker', '~> 4.0' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.7' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use Active Model has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Active Storage variant # gem 'image_processing', '~> 1.2' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.2', require: false group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] end group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '~> 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end group :test do # Adds support for Capybara system testing and selenium driver gem 'capybara', '>= 2.15' gem 'selenium-webdriver' # Easy installation and use of web drivers to run system tests with browsers gem 'webdrivers' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 連絡ありがとうございます。 これです。
komata

2020/08/31 13:16

初期の状態ではできなかったので自分でぐぐりながら少しいじりました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問