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

Ruby driver installation ignores prefix #3678

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Ruby driver installation ignores prefix #3678

monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2015-03-04 14:43:47 +0100
From: @hannesmuehleisen
To: clients devs <>
Version: 11.19.9 (Oct2014-SP2)

Last updated: 2015-05-07 12:37:29 +0200

Comment 20688

Date: 2015-03-04 14:43:47 +0100
From: @hannesmuehleisen

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36
Build Identifier:

The ruby driver wants to always install itself into the system-wide ruby directory, which requires root. This should not be the case, if a prefix is given, that should be used/

Reproducible: Always

Comment 20689

Date: 2015-03-04 15:13:33 +0100
From: @sjoerdmullender

The default location for ruby gems on Darwin is /Library/Ruby/Site/2.0.0. We get this path by asking ruby itself:
ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']"
The question is, what should we use in stead?

What we do now is try to match ruby's installation prefix with the sitelibdir value, and if the former is a prefix of the latter, we subtract that prefix from sitelibdir and use the remainder and stick it on to our own prefix. On Darwin, there is no match (the prefix as returned by ruby is /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr), so we don't do that. What we could do is just glue the sitelibdir that is returned on to our prefix. You would then get
/usr/local/Library/Ruby/Site/2.0.0 (assuming --prefix=/usr/local).

Is that acceptable?

Comment 20697

Date: 2015-03-09 17:06:46 +0100
From: @hannesmuehleisen

I think that would be acceptable!

Comment 20699

Date: 2015-03-09 17:48:13 +0100
From: MonetDB Mercurial Repository <>

Changeset dec9f780e76d made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dec9f780e76d

Changeset description:

When Ruby's sitelibdir is not inside its own or our prefix, append it.
This has an effect on Darwin where Ruby's prefix is
"/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr" but its
sitelibdir is "/Library/Ruby/Site/2.0.0".  So we install our gems in
"$prefix/Library/Ruby/Site/2.0.0" now instead of in
"/Library/Ruby/Site/2.0.0".
This fixes bug #3678.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant