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

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

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

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

Q&A

解決済

2回答

4871閲覧

bundle installが sasscでとまる

rikuou

総合スコア25

Ruby on Rails 5

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

0グッド

0クリップ

投稿2020/11/12 10:38

Ruby on railsを用いてアプリを作成中です
bundle installをしようとした際にインストールが毎回sassでとまってしまいます

Fetching sassc 2.4.0 Installing sassc 2.4.0 with native extensions

環境 Mac OS Catalina バージョン10.15.7

調べたこと

下記サイトでgccのバージョンをあげると解決できるとあったので、最新バージョンにしましたがダメでした
https://github.com/MYDRY/hello_idea/issues/223

% gcc --version gcc (Homebrew GCC 10.2.0) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ファイル

Gemfile source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.6.3' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2.4', '>= 5.2.4.4' # Use mysql as the database for Active Record gem 'mysql2', '>= 0.4.4', '< 0.6.0' # Use Puma as the app server gem 'puma', '~> 3.11' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'mini_racer', platforms: :ruby # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2' # 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.5' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use ActiveStorage variant # gem 'mini_magick', '~> 4.8' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.1.0', 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.0.5', '< 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 chromedriver to run system tests with Chrome gem 'chromedriver-helper' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem 'bootstrap', '~> 5.0.0.alpha2' gem 'jquery-rails'

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

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

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

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

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

maisumakun

2020/11/12 10:53

エラーログなどは出ていませんか?
guest

回答2

0

自己解決

止まったと思っていたのですが10分ほど待っていたら,bundle installが完了しました

大変初歩的なミスで申し訳ありません

投稿2020/11/13 03:13

rikuou

総合スコア25

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

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

0

以下の条件でrailsアプリをインストールしてみました。

ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin19]
Rails 5.2.4.4
gcc Apple clang version 12.0.0 (clang-1200.0.32.21)

1回目のrails newでエラーが出ました

Bundler could not find compatible versions for gem "sprockets":
In snapshot (Gemfile.lock):
sprockets (= 4.0.2)

In Gemfile:
sass-rails (~> 5.0) was resolved to 5.1.0, which depends on
sprockets (>= 2.8, < 4.0)

rails (~> 5.2.4) was resolved to 5.2.4, which depends on sprockets-rails (>= 2.0.0) was resolved to 3.2.2, which depends on sprockets (>= 3.0.0)

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
run bundle exec spring binstub --all
Could not find gem 'mysql2 (>= 0.4.4, < 0.6.0)' in any of the gem sources listed in your Gemfile.

NOTICE: chromedriver-helper is deprecated after 2019-03-31.
Please update to use the 'webdrivers' gem instead.

Gemfileを以下のように修正してbundle update。

 $ diff Gemfile.org Gemfile
13c13
< gem 'sass-rails', '~> 5.0'
---
> gem 'sass-rails'
58c58
< gem 'chromedriver-helper'
---
> gem 'webdrivers'

これで正常にrails sで起動しました。参考にしてください。

$ bundle exec rails s
=> Booting Puma
=> Rails 5.2.4.4 application starting in development
=> Run rails server -h for more startup options
Puma starting in single mode...

  • Version 3.12.6 (ruby 2.6.3-p62), codename: Llamas in Pajamas
  • Min threads: 5, max threads: 5
  • Environment: development
  • Listening on tcp://localhost:3000

Use Ctrl-C to stop

投稿2020/11/12 11:42

technocore

総合スコア7225

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問