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

Makefile: Prefer Ruby 2.7 if available #58

Merged
merged 1 commit into from
Mar 13, 2022
Merged

Conversation

liskin
Copy link
Member

@liskin liskin commented Mar 11, 2022

Ruby 3.0, which is now default in Debian (and likely many other distros), isn't officially supported by the github/pages-gem and some of its dependencies (despite patches being available for over a year—WTF), so make serve doesn't work.

As a workaround, prefer Ruby 2.7 (the "bundle2.7" command) if available.

Related: #37

@liskin liskin requested a review from slotThe March 11, 2022 16:30
@liskin
Copy link
Member Author

liskin commented Mar 11, 2022

Not sure if the naming of bundle2.7 is specific to Debian or something we can expect to be available elsewhere. Can someone check on your distros pls?

@geekosaur
Copy link
Contributor

I'm on Ubuntu so it's unlikely to help with that.

Copy link
Member

@slotThe slotThe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if the naming of bundle2.7 is specific to Debian or something we can expect to be available elsewhere. Can someone check on your distros pls?

I believe it is. Neither Void nor Arch ship ruby 2.7 anymore (and both tell you to install bundler with gem install anyways and don't have a separate package for it). Nix's ruby package is still on 2.7.5 by default, but AFAICT the installed bundler executable is just called that. Though I guess if it helps some people that's already better than the current situation

@liskin
Copy link
Member Author

liskin commented Mar 13, 2022

Oh crap. I wish there was something like Python's -m in Ruby so that we could do something like ruby2.7 -m bundle …. And even that assumes there's a ruby2.7 binary at all. Do you at least have ruby3.0 in your $PATH or does Arch/Void not ship that either?

@slotThe
Copy link
Member

slotThe commented Mar 13, 2022

Oh, actually I was talking nonesense. Void does not have a ruby2.7 but Arch has—seems like I just missed it. It installs bundle-2.7 and bundler-2.7 as executables.

Do you at least have ruby3.0 in your $PATH or does Arch/Void not ship that either?

At least for Void it seems to be the latter :/

@liskin
Copy link
Member Author

liskin commented Mar 13, 2022

Okay, that's helpful :-)
Updated to handle Arch as well, and added a comment with more info.

Ruby 3.0, which is now default in Debian (and likely many other
distros), isn't officially supported by the github/pages-gem and some of
its dependencies (despite patches being available for over a year—WTF),
so `make serve` doesn't work.

As a workaround, prefer Ruby 2.7 (the "bundle2.7" command on
Debian-based distros, "bundle-2.7" on Arch) if available.

Related: xmonad#37
@liskin liskin merged commit eb65e5d into xmonad:gh-pages Mar 13, 2022
@liskin liskin deleted the ruby-wtf branch March 13, 2022 20:39
@github-pages github-pages bot temporarily deployed to github-pages March 13, 2022 20:39 Inactive
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

Successfully merging this pull request may close these issues.

3 participants