bosh ruby version and cf-release ruby version conflict


Zhi Xie
 

My bosh command exists in ruby 2.1.1. And in https://github.com/cloudfoundry/cf-release.git, the .rubyversion shows ruby version is 2.1.8. It looks like be managed by rbenv. But rbenv doesn't have version 2.1.8 by checking 'rbenv install -list'. When I change the ruby version in .rubyversion to 2.1.1. I failed to deploy cf because of ruby version.
So how I fix it?
I follow this guide below to deploy diego to bosh-lite.
https://github.com/cloudfoundry-incubator/diego-release


Vance, David (GE Transportation)
 

Gary,

I have seen this issue as well. You need to use RVM to manage your
environments that require different versions of ruby. I have projects that
require ruby 2.1.4 and bosh/cf do not work. I have created a ruby
environment using 2.3.3 and control this with rvm and applying different
.bash_profiles depending upon which project I am working on and use that
environment for working on cloud foundry projects.

Cheers

David Vance
Lead Systems Engineer
GE Transportation
Cell 678-709-5871

On 1/14/16, 6:42 AM, "Gary xie" <daxiezhi(a)gmail.com> wrote:

My bosh command exists in ruby 2.1.1. And in
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound
ry_cf-2Drelease.git&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI
&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8Dp3vS6m5ji7
HxDiMicFEzPApgn1q0&s=noyA66JHNkQiLfrCA2wbkzr4UsQ4L8R-F_QIJlnA_hg&e= , the
.rubyversion shows ruby version is 2.1.8. It looks like be managed by
rbenv. But rbenv doesn't have version 2.1.8 by checking 'rbenv install
-list'. When I change the ruby version in .rubyversion to 2.1.1. I failed
to deploy cf because of ruby version.
So how I fix it?
I follow this guide below to deploy diego to bosh-lite.
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound
ry-2Dincubator_diego-2Drelease&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3
wUrLrDQYWSI&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8
Dp3vS6m5ji7HxDiMicFEzPApgn1q0&s=7iyqKLlvt4EKwWiFKEGkZtvrSq2d6Uy-E5upLLlwph
Q&e=


Zhi Xie
 

Hi,David, thank for your quickly answer. I have tried rvm before. I have
succeed to install rvm and installed ruby 2.1.8 by it. But I couldn't
switch bosh to ruby 2.1.8 from 2.1.1. Another issue is ruby version in
cf-release is managed by rbenv. It looks like I need to install ruby 2.1.8
by rbenv, then run bosh deployment. Obviously I couldn't do it as I said in
the beginning of the thread because there is no 2.18 in rbenv when I run
'rbenv install -list' to check which version I can install by rbenv.

So I think the solution is
1. switch bosh command into other ruby version, for example 2.2.0
2. change the ruby version in cf-release

So could anybody tell me how can I do it?

2016-01-14 20:46 GMT+08:00 Vance, David (GE Transportation) <
david.vance1(a)ge.com>:

Gary,

I have seen this issue as well. You need to use RVM to manage your
environments that require different versions of ruby. I have projects that
require ruby 2.1.4 and bosh/cf do not work. I have created a ruby
environment using 2.3.3 and control this with rvm and applying different
.bash_profiles depending upon which project I am working on and use that
environment for working on cloud foundry projects.

Cheers

David Vance
Lead Systems Engineer
GE Transportation
Cell 678-709-5871






On 1/14/16, 6:42 AM, "Gary xie" <daxiezhi(a)gmail.com> wrote:

My bosh command exists in ruby 2.1.1. And in
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound
ry_cf-2Drelease.git&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI
&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8Dp3vS6m5ji7
HxDiMicFEzPApgn1q0&s=noyA66JHNkQiLfrCA2wbkzr4UsQ4L8R-F_QIJlnA_hg&e= , the
.rubyversion shows ruby version is 2.1.8. It looks like be managed by
rbenv. But rbenv doesn't have version 2.1.8 by checking 'rbenv install
-list'. When I change the ruby version in .rubyversion to 2.1.1. I failed
to deploy cf because of ruby version.
So how I fix it?
I follow this guide below to deploy diego to bosh-lite.
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound
ry-2Dincubator_diego-2Drelease&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3
wUrLrDQYWSI&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8
Dp3vS6m5ji7HxDiMicFEzPApgn1q0&s=7iyqKLlvt4EKwWiFKEGkZtvrSq2d6Uy-E5upLLlwph
Q&e=
--
Best Regards
Gary


D HR
 

I think you should stick with rbenv instead of ram since rbenv is what cf-release uses. The 'bosh' command has to be installed as a ruby gem into each rbenv-managed Ruby install. So I think you will want to

a) ensure you have the right Ruby version installed by looking at the .ruby-version file in your cf-release folder, and installing it into rbenv by running: rbenv install <version>

B) with your current shell still in the cf-release directory, Run this command to install the bosh cli gem:

$ gem install bosh_cli --no-ri --no-rdoc
(As per https://bosh.io/docs/bosh-cli.html)

Hope it helps

On 14 Jan 2016, at 16:52, Zhi Xie <daxiezhi(a)gmail.com> wrote:

Hi,David, thank for your quickly answer. I have tried rvm before. I have succeed to install rvm and installed ruby 2.1.8 by it. But I couldn't switch bosh to ruby 2.1.8 from 2.1.1. Another issue is ruby version in cf-release is managed by rbenv. It looks like I need to install ruby 2.1.8 by rbenv, then run bosh deployment. Obviously I couldn't do it as I said in the beginning of the thread because there is no 2.18 in rbenv when I run 'rbenv install -list' to check which version I can install by rbenv.

So I think the solution is
1. switch bosh command into other ruby version, for example 2.2.0
2. change the ruby version in cf-release

So could anybody tell me how can I do it?

2016-01-14 20:46 GMT+08:00 Vance, David (GE Transportation) <david.vance1(a)ge.com>:
Gary,

I have seen this issue as well. You need to use RVM to manage your
environments that require different versions of ruby. I have projects that
require ruby 2.1.4 and bosh/cf do not work. I have created a ruby
environment using 2.3.3 and control this with rvm and applying different
.bash_profiles depending upon which project I am working on and use that
environment for working on cloud foundry projects.

Cheers

David Vance
Lead Systems Engineer
GE Transportation
Cell 678-709-5871






On 1/14/16, 6:42 AM, "Gary xie" <daxiezhi(a)gmail.com> wrote:

My bosh command exists in ruby 2.1.1. And in
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound
ry_cf-2Drelease.git&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI
&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8Dp3vS6m5ji7
HxDiMicFEzPApgn1q0&s=noyA66JHNkQiLfrCA2wbkzr4UsQ4L8R-F_QIJlnA_hg&e= , the
.rubyversion shows ruby version is 2.1.8. It looks like be managed by
rbenv. But rbenv doesn't have version 2.1.8 by checking 'rbenv install
-list'. When I change the ruby version in .rubyversion to 2.1.1. I failed
to deploy cf because of ruby version.
So how I fix it?
I follow this guide below to deploy diego to bosh-lite.
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound
ry-2Dincubator_diego-2Drelease&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3
wUrLrDQYWSI&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8
Dp3vS6m5ji7HxDiMicFEzPApgn1q0&s=7iyqKLlvt4EKwWiFKEGkZtvrSq2d6Uy-E5upLLlwph
Q&e=


--
Best Regards
Gary


Zhi Xie
 

Hi,Dave. I think you are totally right. I have resolved ruby version in
cf-release by running ruby-build and git pull ruby 2.1.8. The command is '
cd /home/ubuntu/.rbenv/plugins/ruby-build && git pull && cd -'.
But I couldn't fix this issue of bosh banding ruby's version. It is when I
run ./script/generate-bosh-lite-dev-manifest under cf-release, I got the
message below. It looks like bosh has banded with ruby 2.1.1 in my
environment.
'----------------------------------------------------
rbenv: bosh: command not found

The `bosh' command exists in these Ruby versions:
2.1.1
2.2.1

rbenv: bosh: command not found

The `bosh' command exists in these Ruby versions:
2.1.1
2.2.1

Can only target Bosh Lite Director. Please use 'bosh target' before running
this script.
---------------------------------------------------------------------

2016-01-15 5:31 GMT+08:00 DHR <dave(a)dhrapson.com>:

I think you should stick with rbenv instead of ram since rbenv is what
cf-release uses. The 'bosh' command has to be installed as a ruby gem into
each rbenv-managed Ruby install. So I think you will want to

a) ensure you have the right Ruby version installed by looking at the
.ruby-version file in your cf-release folder, and installing it into rbenv
by running: rbenv install <version>

B) with your current shell still in the cf-release directory, Run this
command to install the bosh cli gem:

$ gem install bosh_cli --no-ri --no-rdoc

(As per https://bosh.io/docs/bosh-cli.html)

Hope it helps

On 14 Jan 2016, at 16:52, Zhi Xie <daxiezhi(a)gmail.com> wrote:

Hi,David, thank for your quickly answer. I have tried rvm before. I have
succeed to install rvm and installed ruby 2.1.8 by it. But I couldn't
switch bosh to ruby 2.1.8 from 2.1.1. Another issue is ruby version in
cf-release is managed by rbenv. It looks like I need to install ruby 2.1.8
by rbenv, then run bosh deployment. Obviously I couldn't do it as I said in
the beginning of the thread because there is no 2.18 in rbenv when I run
'rbenv install -list' to check which version I can install by rbenv.

So I think the solution is
1. switch bosh command into other ruby version, for example 2.2.0
2. change the ruby version in cf-release

So could anybody tell me how can I do it?

2016-01-14 20:46 GMT+08:00 Vance, David (GE Transportation) <
david.vance1(a)ge.com>:

Gary,

I have seen this issue as well. You need to use RVM to manage your
environments that require different versions of ruby. I have projects that
require ruby 2.1.4 and bosh/cf do not work. I have created a ruby
environment using 2.3.3 and control this with rvm and applying different
.bash_profiles depending upon which project I am working on and use that
environment for working on cloud foundry projects.

Cheers

David Vance
Lead Systems Engineer
GE Transportation
Cell 678-709-5871






On 1/14/16, 6:42 AM, "Gary xie" <daxiezhi(a)gmail.com> wrote:

My bosh command exists in ruby 2.1.1. And in
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound

ry_cf-2Drelease.git&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI
&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8Dp3vS6m5ji7
HxDiMicFEzPApgn1q0&s=noyA66JHNkQiLfrCA2wbkzr4UsQ4L8R-F_QIJlnA_hg&e= , the
.rubyversion shows ruby version is 2.1.8. It looks like be managed by
rbenv. But rbenv doesn't have version 2.1.8 by checking 'rbenv install
-list'. When I change the ruby version in .rubyversion to 2.1.1. I failed
to deploy cf because of ruby version.
So how I fix it?
I follow this guide below to deploy diego to bosh-lite.
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound

ry-2Dincubator_diego-2Drelease&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3
wUrLrDQYWSI&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8
Dp3vS6m5ji7HxDiMicFEzPApgn1q0&s=7iyqKLlvt4EKwWiFKEGkZtvrSq2d6Uy-E5upLLlwph
Q&e=


--
Best Regards
Gary

--
Best Regards
Gary


Zhi Xie
 

I got a correct answer. I need to reinstall bosh cli with ruby 2.1.8.

2016-01-15 14:06 GMT+08:00 Zhi Xie <daxiezhi(a)gmail.com>:

Hi,Dave. I think you are totally right. I have resolved ruby version in
cf-release by running ruby-build and git pull ruby 2.1.8. The command is '
cd /home/ubuntu/.rbenv/plugins/ruby-build && git pull && cd -'.
But I couldn't fix this issue of bosh banding ruby's version. It is when I
run ./script/generate-bosh-lite-dev-manifest under cf-release, I got the
message below. It looks like bosh has banded with ruby 2.1.1 in my
environment.
'----------------------------------------------------
rbenv: bosh: command not found

The `bosh' command exists in these Ruby versions:
2.1.1
2.2.1

rbenv: bosh: command not found

The `bosh' command exists in these Ruby versions:
2.1.1
2.2.1

Can only target Bosh Lite Director. Please use 'bosh target' before
running this script.
---------------------------------------------------------------------

2016-01-15 5:31 GMT+08:00 DHR <dave(a)dhrapson.com>:

I think you should stick with rbenv instead of ram since rbenv is what
cf-release uses. The 'bosh' command has to be installed as a ruby gem into
each rbenv-managed Ruby install. So I think you will want to

a) ensure you have the right Ruby version installed by looking at the
.ruby-version file in your cf-release folder, and installing it into rbenv
by running: rbenv install <version>

B) with your current shell still in the cf-release directory, Run this
command to install the bosh cli gem:

$ gem install bosh_cli --no-ri --no-rdoc

(As per https://bosh.io/docs/bosh-cli.html)

Hope it helps

On 14 Jan 2016, at 16:52, Zhi Xie <daxiezhi(a)gmail.com> wrote:

Hi,David, thank for your quickly answer. I have tried rvm before. I have
succeed to install rvm and installed ruby 2.1.8 by it. But I couldn't
switch bosh to ruby 2.1.8 from 2.1.1. Another issue is ruby version in
cf-release is managed by rbenv. It looks like I need to install ruby 2.1.8
by rbenv, then run bosh deployment. Obviously I couldn't do it as I said in
the beginning of the thread because there is no 2.18 in rbenv when I run
'rbenv install -list' to check which version I can install by rbenv.

So I think the solution is
1. switch bosh command into other ruby version, for example 2.2.0
2. change the ruby version in cf-release

So could anybody tell me how can I do it?

2016-01-14 20:46 GMT+08:00 Vance, David (GE Transportation) <
david.vance1(a)ge.com>:

Gary,

I have seen this issue as well. You need to use RVM to manage your
environments that require different versions of ruby. I have projects
that
require ruby 2.1.4 and bosh/cf do not work. I have created a ruby
environment using 2.3.3 and control this with rvm and applying different
.bash_profiles depending upon which project I am working on and use that
environment for working on cloud foundry projects.

Cheers

David Vance
Lead Systems Engineer
GE Transportation
Cell 678-709-5871






On 1/14/16, 6:42 AM, "Gary xie" <daxiezhi(a)gmail.com> wrote:

My bosh command exists in ruby 2.1.1. And in
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound

ry_cf-2Drelease.git&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI
&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8Dp3vS6m5ji7
HxDiMicFEzPApgn1q0&s=noyA66JHNkQiLfrCA2wbkzr4UsQ4L8R-F_QIJlnA_hg&e= ,
the
.rubyversion shows ruby version is 2.1.8. It looks like be managed by
rbenv. But rbenv doesn't have version 2.1.8 by checking 'rbenv install
-list'. When I change the ruby version in .rubyversion to 2.1.1. I
failed
to deploy cf because of ruby version.
So how I fix it?
I follow this guide below to deploy diego to bosh-lite.
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cloudfound

ry-2Dincubator_diego-2Drelease&d=CwICaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3
wUrLrDQYWSI&r=ZYiCqiQacezNXiYYS8wCEr0hKx0kUixQmXEkLyZV6tM&m=FvL4iwNPukc_v8
Dp3vS6m5ji7HxDiMicFEzPApgn1q0&s=7iyqKLlvt4EKwWiFKEGkZtvrSq2d6Uy-E5upLLlwph
Q&e=


--
Best Regards
Gary


--
Best Regards
Gary
--
Best Regards
Gary