I am using CentOS 7, and it uses ruby 2.0:
[root@localhost ~]$ sudo ruby --version
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
gem install failed:
[root@localhost ~]# gem install aws-sdk
Fetching: http-2-0.10.1.gem (100%)
ERROR: Error installing aws-sdk:
http-2 requires Ruby version >= 2.1.0.
I believe it failed because aws-sdk-appmesh depends on aws-sdk-core and aws-sdk-core:3.47.0 added http-2 as new dependency...
Any idea/plan to fix/workaround the issue?
p.s. tried to upgrade ruby in my virtual environment, and made a mess =(.
Thanks.
Yeah we just hit this. The version check in the Gemfile doesn't seem to work.
https://github.com/aws/aws-sdk-ruby/blob/9257098cfd8a386e5424f998fcb5cd2d11222a1a/Gemfile#L62
I can confirm this, just hit it today with our servers...
# gem install aws-sdk
ERROR: Error installing aws-sdk:
http-2 requires Ruby version >= 2.1.0.
install the previous version works, as a temporary workaround:
# gem install aws-sdk -v 2.11.240
Fetching: aws-sdk-core-2.11.240.gem (100%)
Fetching: aws-sdk-resources-2.11.240.gem (100%)
Fetching: aws-sdk-2.11.240.gem (100%)
Successfully installed aws-sdk-core-2.11.240
Successfully installed aws-sdk-resources-2.11.240
Successfully installed aws-sdk-2.11.240
3 gems installed
Installing ri documentation for aws-sdk-core-2.11.240...
Installing ri documentation for aws-sdk-resources-2.11.240...
Installing ri documentation for aws-sdk-2.11.240...
Installing RDoc documentation for aws-sdk-core-2.11.240...
Installing RDoc documentation for aws-sdk-resources-2.11.240...
Installing RDoc documentation for aws-sdk-2.11.240...
Given there are 1.2K commits since this release ! (https://github.com/aws/aws-sdk-ruby/releases/tag/v2.11.240) I guess it might take a little unpicking
Taking a look
@dgem I wouldn't recommend downgrading to V2 from V3 on this case, pinning to the previous version of aws-sdk-core (3.46.0) is a reasonable workaround while we sort this out.
It looks like what we are going to have to do here is to remove the http-2 gem from the gemspec, and require users to separately include that gem in order to use H2-related features.
Testing that now in a branch.
Working on a fix in #1995
Update on this issue:
If you are using Ruby versions before 2.1, you will be unable to update aws-sdk-core to 3.47.0 due to the new dependency on http-2. While these versions of Ruby are end of life, we're not intending to hard-break users of these Ruby versions, so we are treating this as a bug.
If you're using Ruby versions >= 2.1.0, this issue does not impact you and there is no action required at this time. If you're using an older version of Ruby, you'll need to pin aws-sdk-core to 3.46.0 until we get a fix out.
Our current plan is to make the http-2 gem an optional dependency. Once we do so, to use the HTTP/2-based asynchronous APIs, you'll be required to provide the http-2 gem yourself, for example by including it in your Gemfile. If you do not, you'll receive an initialization error when you try to initialize any asynchronous client.
This is unfortunately a breaking change if you're using a new version of Ruby and quickly adopted the HTTP/2 clients, so I'm open to ideas if there's a better way. But on balance, this change would break fewer users.
I'm going to add that there's a good chance we're going to wait until Monday to deploy a fix. Reasoning:
I do recommend that anybody using the HTTP/2 features currently get ahead of the changes by explicitly adding the http-2 gem to their dependencies now.
One question: I pinned the versions of the following gems:
aws-sdk-autoscaling: 1.13.0
aws-sdk-sqs: 1.10.0
And still, I'm running into this new dependency problem. My expectation is that if I pin a gem all the dependent gems are also pinned? Is this not true for the aws-sdk-core?
Update: Just seeing this https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-autoscaling/aws-sdk-autoscaling.gemspec#L26
Why is the version not pinned to a specific version?
Thanks @awood45 , I was basing my decision on the Releases page, then realized my mistake.
Can you confirm how to achieve this through the command line, I installed the aws-sdk-core @ 3.46.0
# gem list
*** LOCAL GEMS ***
aws-eventstream (1.0.2)
aws-partitions (1.144.0)
aws-sdk-core (3.46.0)
aws-sigv4 (1.1.0)
jmespath (1.4.0)
But still get the problem when installing the sdk:
# gem install aws-sdk
ERROR: Error installing aws-sdk:
http-2 requires Ruby version >= 2.1.0.
In my case, these gems are installed as part of a boostrap process to allow the instances to be provisioned rather than as part of an app via a Gemfile.
Thanks for any advice you might be able to offer @awood45 or @michaelwittig
On the question of pinning, the gem you'd need to pin is aws-sdk-core to 3.46.0, though the fix release is likely imminent.
If you're using the command line, you'd add a -v option, such as:
gem install aws-sdk-core -v 3.46.0
The PR for this is merged and pending release.
Update: latest version with fix is released 3.48.0, closing
Fantastic news, thanks for fixing so rapidly.
FYI, as per my earlier comments, we couldn't pin through the cmd line due to gem install aws-sdk resulting in the same error after installing aws-sdk-core at 3.46.0.
In the end I found working machine and used gem lock to generate a Gemfile which I could then bundle install with.... mentioning for prosperity.
Looking forward to removing 鈽濓笍 that workaround :)
Most helpful comment
The PR for this is merged and pending release.