How does ruby version get set and updated on ELB?
I've been using ruby 2.2.2
on our qa and staging env's for about 8 months now. I just setup our production env Monday and it wouldn't deploy as it said ruby was set to 2.2.3 and my gemfile said 2.2.2. I updated and redeployed and everything seemed to be fine.
I came back to the qa/staging env's and can't get it to update to ruby 2.2.3. Kept saying ruby version is 2.2.2 and Gemfile is 2.2.3
I upgraded (through elb ui):
64bit Amazon Linux 2015.03 v1.3.1 running Ruby 2.2 (Passenger Standalone)
to
64bit Amazon Linux 2015.09 v2.0.6 running Ruby 2.2 (Passenger Standalone)
Now it says Your Ruby version is 2.2.3, but your Gemfile specified 2.2.2
. There has to be an easier way to do this.
Since you want to update both the platform and the version label at the same time you can always use the UpdateEnvironment API specifying both the solution stack name and version label parameters.
http://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_UpdateEnvironment.html
You can use the aws cli or sdk to do this.
Step-By-Step as described by @Scott:
aws elasticbeanstalk update-environment --environment-name "corresponding_env_name" --solution-stack-name "64bit Amazon Linux 2015.09 v2.0.6 running Ruby 2.2 (Passenger Standalone)" --version-label "zip_name_you_uploaded"
I found a different approach to this problem.
The way I made it work is similar to the comment above with a small change.
Steps I did:
The AMI option-settings was key for me, as this helped me the AMI with ruby 2.3.7 installed to be used for launching the new instance on the existing environment. Previously just hitting @Rohit Banga suggested command failed on every try.
Not to forget, I have also specified the ruby version "2.3.7" in my Gemfile as well.