.ruby-version support

36 views
Skip to first unread message

Bert Driehuis

unread,
Sep 11, 2019, 1:36:30 PM9/11/19
to Brightbox Ruby Ubuntu Packaging
I'm replacing an rbenv based deployment mechanism with brightbox packages, and I would like to avoid having to call specific binaries like gem2.3. I'm looking for a very lightweight rbenv replacement that picks the binaries that match the .ruby-version file, but my Google-fu did not turn up any that are compatible with the Brightbox packages.

Of course, writing a script that sets up a directory tree under /opt/rubies or ~/.gem/n.n/bin with symlinks to the respective binaries is not rocket surgery but I was hoping someone already did the heavy lifting, or that I'm overlooking the obvious (the directory tree described would allow using chruby FWIW).

With kind regards,

Bert

Glenn Pratt

unread,
Sep 11, 2019, 1:55:15 PM9/11/19
to Brightbox Ruby Ubuntu Packaging

Glenn Pratt

unread,
Sep 11, 2019, 1:55:16 PM9/11/19
to brightbox-ruby-...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Brightbox Ruby Ubuntu Packaging" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brightbox-ruby-ubuntu...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/brightbox-ruby-ubuntu-packaging/85548867-60dd-4c9e-8f16-030652c5aeb9%40googlegroups.com.

Bert Driehuis

unread,
Sep 12, 2019, 7:26:12 AM9/12/19
to Brightbox Ruby Ubuntu Packaging


On Wednesday, September 11, 2019 at 7:55:15 PM UTC+2, Glenn Pratt wrote:
Have you considered update-alternatives?

Yes I have. The attraction of rbenv/chruby/rvm is that it guarantees that the Ruby version the app was tested against is the version it will be deployed against, or it won't start up at all.

Also, update-alternatives can not be set per app.

I'm half considering dumping the whole issue by going the container route, but that brings with it its own can of worms.

With kind regards,

Bert

Shireesh Jayashetty

unread,
Sep 12, 2019, 7:26:12 AM9/12/19
to Brightbox Ruby Ubuntu Packaging
Have you considered using ruby-switch CLI? it comes with brightbox ruby I think.


Regards
Shrieesh

Shireesh Jayashetty (eLitmus)

unread,
Sep 12, 2019, 7:26:12 AM9/12/19
to brightbox-ruby-...@googlegroups.com
Have you considered using ruby-switch CLI? it comes with brightbox ruby I think.

Regards
Shrieesh

--
You received this message because you are subscribed to the Google Groups "Brightbox Ruby Ubuntu Packaging" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brightbox-ruby-ubuntu...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/brightbox-ruby-ubuntu-packaging/85548867-60dd-4c9e-8f16-030652c5aeb9%40googlegroups.com.


--
eLitmus Evaluation Private Limited
L29, 2nd Floor, 2nd A Main,
Sector 6, HSR Layout,
Bangalore - 560102
www.eLitmus.com | www.paclabs.com | www.codelitmus.com

Bert Driehuis

unread,
Sep 13, 2019, 6:37:09 AM9/13/19
to Brightbox Ruby Ubuntu Packaging
Dear Shireesh,

Have you considered using ruby-switch CLI? it comes with brightbox ruby I think.

Yes I have. It is a wrapper around update-alternatives and requires root to use, so it does not fit the problem.

I'm going to give up on this for now. Maybe I'll get to it later. It shouldn't be too hard to hook a script to apt (using apt.conf.d) that sets up a symlink forest for chruby to use, but for now switching to docker is likely to be the faster option.

Thanks to all who thought along!

With kind regards,

Bert
Reply all
Reply to author
Forward
0 new messages