Home>

I'm creating an app using Ruby on rails
Every time I try to bundle install, the installation stops at sass

Fetching sassc 2.4.0
Installing sassc 2.4.0 with native extensions


Environment Mac OS Catalina version 10.15.7

What I looked up

It was said that it could be solved by raising the version of gcc on the following site, so I made it the latest version, but it was useless
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.
File
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'
  • Answer # 1

    I thought it stopped, but after waiting about 10 minutes, bundle install was completed

    Sorry for the very rudimentary mistake

  • Answer # 2

    I installed the rails app under the following conditions.

    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)

    I got an error in the first 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)

    Runningbundle updatewill 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.

    Modify the Gemfile as follows and bundle update.

    $Diff Gemfile.org Gemfile
    13c13
    5.0'
    ---
    >Gem'sass-rails'
    58c58
    ---
    >Gem'webdrivers'

    You have successfully booted into rails s. please refer.

    $bundle exec rails s
    =>Booting Puma
    =>Rails 5.2.4.4 application starting in development
    =>Runrails server -hfor 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