Our Masto instance is still getting "/usr/bin/env: ‘ruby2.3’: No such file or directory" when trying to-be-crontabbed commands from the production guide such as "RAILS_ENV=production bundle exec rake mastodon:media:clear" as the mastodon user.

Ruby 2.3.1 is installed and any other command seems to use it just fine.

Help!

@HedgeMage Try this command:

$ which ruby2.3

And see if that comes up with a location that's in your env

@munin No, I have Ruby 2.3.1 which may be the confusion if someone hardcoded the ruby2.3 string instead of some sane alternative.

I'm not sure where to dig in to debug it, though.

@HedgeMage Well, you could always use the sysadmin 'brute force and ignorance' solution, and

$ ln -s ruby2.3.1 ruby2.3

;-)

@HedgeMage @munin did you run that "which ruby2.3" command on the CLI and it returned an error? If so, that's your problem and the symlink solution proposed by @munin should work, it just has to be made in a directory that's in the PATH for the user the cron job runs as. Not sure if I made sense, let me know!
@hisham_hm @munin After further investigation, it looks like even after feeding the command the full rbenv bundler path, halfway through some script it tries to use the system one. Ugh.