Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Notes about Ruby 3.0 on FreeBSD

Issue

Gems don't install if you try to use:

cat /etc/make.conf 
DEFAULT_VERSIONS= ruby=3.0

The example port used to show this is devel/rubygems-racc.

ruby-gems

devel/ruby-gems should be probably be updatet to something newer or at least this patch should be applied https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253104

gem install

For some reason gem install stoped creating a spec, cache and doc dir.

A quick fix is in Mk/Uses/gem.mk to patch this:

-GEMSPEC=       ${PORTNAME}.gemspec
+GEMSPEC=       ${PORTNAME}-${PORTVERSION}.gemspec

...

 do-install:
+       @(mkdir -p ${STAGEDIR}${PREFIX}/${SPEC_DIR})
+       @(mkdir -p ${STAGEDIR}${PREFIX}/${CACHE_DIR})
+       @(mkdir -p ${STAGEDIR}${PREFIX}/${DOC_DIR})

The real fix should probably fix ? devel/ruby-gems ? in a way gem install ensures the creation of this directories at least that is the assumption since it worked for ruby27 and it works for ruby30 on linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment