Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ruby 2.3.3 dependency for bootstrap-sass 3.4.0 #1182

Open
vid-pas opened this issue Dec 20, 2018 · 7 comments
Open

Add ruby 2.3.3 dependency for bootstrap-sass 3.4.0 #1182

vid-pas opened this issue Dec 20, 2018 · 7 comments

Comments

@vid-pas
Copy link

vid-pas commented Dec 20, 2018

Is there a place to note Ruby dependencies for bootstrap-sass?
It appears that bootstrap-sass 3.4.0 requires Ruby 2.3.3.


This is a relevant problem when installing ruby and bootstrap-sass via `apt'.

By default apt installs the latest bootstrap-sass (currently 3.4.0) and ruby 2.3.1.
Here's the error I get when building a server with Ansible:
ERROR: Error installing bootstrap-sass:\n\tsassc requires Ruby version >= 2.3.3.

Apt is limited to Ruby 2.3.1; Per: https://www.ruby-lang.org/en/documentation/installation/ "As of writing, the ruby-full package provides Ruby 2.3.1, which is an old stable release, on Debian and Ubuntu."

It would be ideal if this could be updated in the same place that other dependencies are set for ruby gems. When I look here for example: https://rubygems.org/gems/bootstrap-sass/versions/3.4.0
It reads: "Required Ruby Version: >= 0"

Maybe in bootstrap-sass.gemspec?

@vid-pas vid-pas changed the title Note bootstrap-sass 3.4.0 ruby dependencies Add ruby 2.3.3 dependency for bootstrap-sass 3.4.0 Jan 8, 2019
@komlenic
Copy link

komlenic commented Feb 6, 2019

I ran into this issue as well when working with bootstrap-sass 3.4 in Drupal 8 and seeing 'bundle install' failing. Ruby 2.0.x is the latest version available to install on CentOS via yum and regular repositories. Once I installed Ruby 2.3.3 via RVM, everything works correctly, but I only arrived at that solution by discovering this GitHub issue.

@DeeDeeG
Copy link

DeeDeeG commented Feb 7, 2019

I found a way to specify required ruby versions (as you had guessed, it is indeed via the .gemspec file): https://stackoverflow.com/questions/5004492/how-do-you-specify-a-minimum-ruby-version-in-a-gemspec

spec.required_ruby_version ='>= 2.3.3'

or

spec.required_ruby_version ='~> 2.3.3'

etc.

Edit to add an example usage "in the wild": https://github.com/rails/rails/blob/0decd2d/rails.gemspec#L12

@glebm
Copy link
Member

glebm commented Feb 7, 2019

I suspect sassc doesn't really need 2.3.3. Consider checking if it works with 2.3.1 and sending a PR to sassc

@DeeDeeG
Copy link

DeeDeeG commented Feb 7, 2019

I filed sass/sassc-ruby#106 to see if sassc-ruby would be interested in lowering their required Ruby version number.

@DeeDeeG
Copy link

DeeDeeG commented Feb 14, 2019

@vid-pas, @komlenic,

If you folks need a workaround, you can:

  • Change the line spec.required_ruby_version = [version] of the sassc.gemspec filein the sassc repo like so:
   spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})

-  spec.required_ruby_version = ">= 2.3.3"
+  spec.required_ruby_version = ">= 2.0.0"

   spec.require_paths = ["lib"]
  • And specify this patched sassc in your Gemfile like so:
gem 'sassc', git: 'https://github.com/[username]/sassc-ruby', ref: '[commit-hash]'

example:

gem 'sassc', git: 'https://github.com/DeeDeeG/sassc-ruby', ref: '19f07dfc2790173f8a73fe0bfa1310fcdbbd63ce'

(You can use my fork, based off of sassc-ruby's master branch as of a few days ago... But I'm not planning to update or maintain the fork, so it will be out-of-date very quickly. I recommend either manually patching as I described (so you can update and re-patch as needed), or politely making some noise about this over at the sass/sassc-ruby repo.)

Best,

- DeeDeeG

@dracmaAgil
Copy link

dracmaAgil commented Mar 15, 2019

I'm using linux mint 17.1 and rbenv, I got this dependency problem but I update ruby-build: cd /home/"your user"/.rbenv/plugins/ruby-build && git pull && cd - and list again ruby versions and there was updated, 2.3.2-2.3.8. I hope this works for you guys!

@DeeDeeG
Copy link

DeeDeeG commented Mar 15, 2019

Yeah, using a ruby version manager, like RVM or rbenv is the main way to get ruby outside of the ubuntu/fedora/centos(etc...) repositories.

(I prefer rbenv, personally. And with rbenv, it's good to keep rbenv and the ruby-build plugin up-to-date, as @dracmaAgil says.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants