Re: auto restarting in crontab
On Thu, Mar 16, 2023 at 7:03 PM Dan Ritter <dsr@randomstring.org> wrote:
>
> debian-user@howorth.org.uk wrote:
> > Dan Ritter <dsr@randomstring.org> wrote:
> > > pyh@ymail.ne.jp wrote:
> > > > For dev stuff, for example, I have many versions of ruby installed
> > > > in the system by rbenv.
> > > >
> > > > Since I often change default ruby in interactive shell, this may
> > > > break the ruby for sysadmin job in crontab. What’s the solution for
> > > > this?
> > >
> > > Everywhere it matters, set an explicit PATH at the beginning.
> > >
> > > There is no other solution.
> >
> > Err, I know nothing about the subject but that doesn't seem to
> > correspond with what it says in the readme at
> > https://github.com/rbenv/rbenv
>
> rbenv is a fancy way of setting the PATH. It changes out setting
> the PATH directly for requiring you to set up a .ruby-version
> file for every project. If you commit to it, it might be better
> for you. If you don't, it's harder to debug what's going wrong.
>
> In general, development environments might want multiple Ruby
> versions but production should only have one. If the production
> version isn't the one that Debian is currently shipping, the
> Debian-shipped version shouldn't be installed at all.
Likely this. Debian removed update-alternatives for Ruby; see [1]. And
from [1] under "Installing Ruby versions not packaged in Debian":
While ruby-build is a great tool to build Ruby versions
that are not available via APT, you should still use the
Debian-packaged versions of Ruby whenever possible since
they are tested and supported by the Debian community.
[1] https://wiki.debian.org/Ruby
Jeff
Reply to: