Closed allomov closed 8 years ago
Hey allomov!
Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you've already signed the CLA.
I've created: https://www.pivotaltracker.com/story/show/104923910 to fix deployment of the Director with 1.9.3 ruby.
That sounds like a solution for this particular case. I am wondering if there is a way to prevent such issues in future.
bosh-director
switched to Ruby 2 starting from 1.2657.0
(link), but at the same time bosh-init
supports bosh starting with 1.2915.0
(due problems with stemcell).
Because of this facts I thought, that deprecating ruby 1.9.3 is an easier way to overcome this issue.
Unfortunately there are still people out there using ruby 1.9.3 as system ruby which makes it annoying for them to get things running.
Support your point of view.
Hi, all.
Here is a problem that I've met several times. First time I say it yesterday, when I tried to help in IRC channel (link to the discussion). The problem was that running
bosh-init
failed and produced the following output:Taking a closer look on this problem I found out that it happens because bosh-init uses host version of Ruby. And different versions of ruby have different behaviour for
YAML.dump
method, that is called in templates of BOSH release in several places (here for example).In Ruby 2.0+ you can run
YAML.dump
on strings and booleans without any problems:Still in case of Ruby 1.9.3 an exception is raised because
JSON.dump
expects an array or hash as a parameter:The message that people see in the current stacktrace does not reflects an actual root of the problem. So I decided to place an exception with according message in case when ruby version is wrong. As far as I can see this is the easiest way to cope with this issue.
This issue is aggravated by the fact that standard Ubuntu goes with Ruby 1.9.3 pre-installed and new comers can easily face it.