sass / sassc-ruby

Use libsass with Ruby!
MIT License
366 stars 156 forks source link

sassc 2.4.0 will not install in Ubuntu 20.04 LTS #209

Closed cybessk0011 closed 4 years ago

cybessk0011 commented 4 years ago

Hello everyone. I am installing my railsapp with twitter-bootstrap-rails as a gem in my Gemfile:

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.1'

gem 'puma', '~> 4.1'
gem "twitter-bootstrap-rails"
gem "omniauth-google-oauth2"

# AWS Ruby SDK
gem 'aws-sdk-ec2'

#capybara
gem 'capybara'

#rspec
gem 'rspec'

#rpsec-rails
gem 'rspec-rails'

# devise
gem 'devise'

# whenever
gem 'whenever'

# devise imapable
#gem 'devise_imapable'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '>= 6.0.2.2'

# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'

# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '>= 5'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks', '~> 5'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

Every time I install using bundle install, my install hangs at Installing sassc 2.4.0 with native extensions. I have removed the Gemfile.lock and tried to install with the Gemfile.lock in place as well. I have received this error:

./scripts/setup-cssp.sh: line 3: 13 Killed bundle install Could not find gem 'sass-rails (>= 5)' in any of the gem sources listed in your Gemfile. Run bundle install to install missing gems

After receiving this error was where I removed the Gemfile.lock and then produced:

./scripts/setup-cssp.sh: line 3: 13 Killed bundle install Could not find gem 'twitter-bootstrap-rails' in any of the gem sources listed in your Gemfile. Run bundle install to install missing gems

I understand that the sassc install typically takes a good chunk of time since it can't have libraries linked to it due to the nature of Ruby Gems, but why does the install hang and not proceed? Any help on this would be greatly appreciated. Thanks!

Edit I forgot to mention my system. I am running on Ubuntu 20.04 LTS within an Ubuntu 20.04 Docker Container.

rudolfkopriva commented 4 years ago

I have the same issue. Ubuntu 20.04 LTS, new rails project from template. It got stuck on bundle install while compiling native extension for sassc 2.4.0. I changed Gemfile to use gem 'sass-rails', '>= 5.1.0' and it works.

JohnObla commented 4 years ago

I was able to work around this by using an older version of rails. Here's the code using rbenv:

gem install rails -v 5.2.4.2 rbenv rehash rbenv exec rails _5.2.4.2_ new demoapp

Source: https://gorails.com/setup/ubuntu/20.04#rails

cybessk0011 commented 4 years ago

Interesting that those worked for the both of you. I found that this was a memory dump error, where sassc needs at least 1G of ram to install. Since the instance I was installing on had 1G, but was also running a container, I ran out of memory during install, hence the inconsistent results. Finally allowing 2G ram for my machine allowed me to run bundle install with no issues.

JohnObla commented 4 years ago

Interesting that those worked for the both of you. I found that this was a memory dump error, where sassc needs at least 1G of ram to install.

That's amazing, glad to hear you solved it!

Out of curiosity, which command did you use to return the memory dump error?

On my machine the terminal would just hang 😅

cybessk0011 commented 4 years ago

I had kdump configured and it was recovering the system whenever I ran my Bundler.