-
Notifications
You must be signed in to change notification settings - Fork 253
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
Can't install latest sshkit on Ruby 2.2 or older #548
Comments
A third potential option is to write our own base64 implementation to eliminate the gem dependency. However, this will give us only a short reprieve, since |
I'd lean towards not supporting older Ruby. According to https://www.ruby-lang.org/en/downloads/branches/, Ruby 2.1 went out of support on 2017-03-31. That's a long time ago in computer terms. And if someone is forced to use a very old version of Ruby, they do have the option of pinning Capistrano to an older version too. |
Already, the latest version of the sshkit gem is no longer installable on Ruby 2.2 or older. See #548. Rather than add workarounds to the sshkit code to restore compatibility with old versions of Ruby, we've decided to officially drop support for them. This PR drops support for Ruby 2.0, 2.1, 2.2, 2.3, and 2.4. For reference, Ruby 2.4 was officially EOL'd 4 years and 9 months ago (31 Mar 2020), so it is not unreasonable for us to drop support in 2025. If users wish to use the sshkit gem on an old version of Ruby, they can still do so by installing an older version. For example, 1.22.0 works on Ruby 2.2. ``` gem install sshkit -v 1.22.0 ```
Closing via #549 |
Using Ruby 2.2:
Attempt to install sshkit:
The problem is that we have added a dependency on the base64 gem in order to support Ruby 3.4+, but the base64 gem is not available on Ruby 2.2 or older.
In our gemspec, we have this line:
sshkit/sshkit.gemspec
Line 23 in d8acf40
However, this doesn't work as intended. The
RUBY_VERSION
check is evaluated at gem publishing time, not at runtime. Assuming we publish the gem using a recent version of Ruby (which we do), then the gem will always have the base64 dependency, regardless of the Ruby version being used to install sshkit.Further explanation about why it is bad to use
RUBY_VERSION
conditionals: rubocop/ruby-style-guide#763Therefore, I think there are two potential fixes:
base64
dependency entirely. This will fix installation on old versions of Ruby. However people using Ruby 3.4+ will have a bad experience: they will need to manually installbase64
or add it to their Gemfile, otherwise sshkit won't work.I'm leaning toward dropping support for old versions of Ruby, given the fact that we have not received any bug reports from people using old versions of Ruby regarding this issue.
Edit: the last version of sshkit that seems to successfully install on Ruby 2.2 is sshkit 1.22.0.
The text was updated successfully, but these errors were encountered: