capistrano / capistrano/rbenv

More informative error messages

Open
#100 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Ruby
Stars
217
Forks
59
PR merge metrics
No merged PRs in 30d

Description

There are lots of cases out there of users confused by cases of Capistrano apparently failing to find a version of Ruby that was installed with rbenv. In such cases we see output like this:

```
$ bundle exec cap staging deploy
00:00 rbenv:validate
WARN rbenv: 3.1.2 is not installed or not found in $HOME/.rbenv/versions/3.1.2 on 123.123.123.123
```

I was recently baffled by a case like this, because I knew for sure that this version of Ruby was installed in the specified location, and I hadn't changed anything.

It turned out that the underlying problem was simply that Capistrano was unable to log into the server, because the relevant user's password had expired and needed to be changed.

I would have been saved a lot of head scratching if the output from the rbenv:validate command had reflected this problem rather than seeming to imply that it had connected to the server in question but found Ruby absent at the specified path.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the rbenv:validate command and how it reports failures when connecting to the remote server. Reproduce the expired-password or failed-login case, then verify that the output distinguishes connection problems from Ruby versions missing at the specified path.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.