-
Notifications
You must be signed in to change notification settings - Fork 30
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
/usr/bin integration #6
Comments
I was coming to look for this -- if this means no need to run |
Correct, that's exactly what this is supposed to be. |
Ah, but reading more closely, rbenv is still there, you just don't need to know about it. "These scripts simply call /usr/bin/rbenv exec {ruby|gem|bundle|irb}". Hmm, if that's really all they do... this is a pretty trivial implementation, I could try it out myself by just writing those four scripts myself? (I still kind of wish there was no rbenv involved at all, but i'm not sure how rational this is). |
Yes it should be pretty trivial (though integration with the Debian alternatives system needs to be figured out, and documentation needs to be written for it). And contributions are always welcome. |
I'm using # install ruby 3.0
RUN apt-get update -q \
&& apt-get dist-upgrade --assume-yes \
&& apt-get install --assume-yes -q --no-install-recommends \
curl \
gnupg \
apt-transport-https \
ca-certificates
RUN curl -SLf https://raw.githubusercontent.com/fullstaq-labs/fullstaq-ruby-server-edition/main/fullstaq-ruby.asc | apt-key add - \
&& echo "deb https://apt.fullstaqruby.org ubuntu-20.04 main" > /etc/apt/sources.list.d/fullstaq-ruby.list \
&& apt-get update -q \
&& apt-get install --assume-yes -q --no-install-recommends fullstaq-ruby-3.0 \
&& apt-get autoremove --assume-yes \
&& rm -rf /var/lib/apt/lists \
&& rm -fr /var/cache/apt \
&& rm /etc/apt/sources.list.d/fullstaq-ruby.list
RUN update-alternatives --install /usr/local/bin/bundle bundle /usr/lib/fullstaq-ruby/versions/3.0/bin/bundle 100
RUN update-alternatives --install /usr/local/bin/bundler bundler /usr/lib/fullstaq-ruby/versions/3.0/bin/bundler 100
RUN update-alternatives --install /usr/local/bin/gem gem /usr/lib/fullstaq-ruby/versions/3.0/bin/gem 100
RUN update-alternatives --install /usr/local/bin/irb irb /usr/lib/fullstaq-ruby/versions/3.0/bin/irb 100
RUN update-alternatives --install /usr/local/bin/ruby ruby /usr/lib/fullstaq-ruby/versions/3.0/bin/ruby 100 |
Rubies are now installed into their own directories that are not in PATH. This safe, but it's not very user-friendly, especially not for users who only intend to install 1 Ruby version on their system.
We should have some kind of way to provide /usr/bin/{ruby,gem,bundle,irb}. This will conflict with the system Ruby package, but c'est la vie.
On Debian/Ubuntu, we should integrate with the alternatives system.
How would this work? A proposal
We provide an optional
fullstaq-ruby-system-integration
package. This package contains the scripts /usr/lib/fullstaq-ruby/system-integration/bin/{ruby,gem,bundle,irb}.These scripts simply call
/usr/bin/rbenv exec ruby|gem|bundle|irb
.This package integrates with the alternatives system to ensure that /usr/bin/{ruby,gem,bundle,irb} are symlinked to the corresponding script in /usr/lib/fullstaq-ruby/system-integration/bin.
The text was updated successfully, but these errors were encountered: