-
Notifications
You must be signed in to change notification settings - Fork 66
Check Ruby Version in ml.sh bat #305
Comments
Given how common 1.8.7 still is in the wild, my preference is to catch the errors where they happen. I think there are only a small number of places where it matters. Ruby is flexible enough to allow for catching errors on imports, which is pretty cool. Can't remember, where are the dependencies on 1.9.3+? Not showing a typed password on the command line and...? |
How about just a warning if the version does not match the required version? |
The file ml.rb actually contains a version check somewhere near the top. But that only gets triggered for Ruby version < 1.8.7. We could either raise that number to 1.9.3, or add a second case for versions between 1.9.3 and 1.8.7. Password prompt is one. I am sure I have seen at least one other explicit catch, but can't find it right now. Next to that I did notice on the demo servers, which are running 1.8.7 out of the box, that the JSON parsing of responses for bootstrap and such break, but that is only to pretty print the response. My general impression is that Ruby is pretty resilient, and we are hardly using any features that are not in 1.8.7. One major concern is though that we are not explicitly testing against 1.8.7, and I am not even sure we actually test against 1.9.3. I am running 2.0.0 myself. I'd vote for increasing that number and warn that Roxy hasn't been tested against older version. It likely mostly work, but no guarantees, etc etc.. |
I did a pull request warning people that some features won't work with Ruby 1.8.7. A quick test shows that when run with 1.8.7, response messages aren't parsed.
The above shows the warning that comes with the PR I submitted -- you'll see that with basically every command you run. Likewise, that error message will be common. Bootstrap and wipe do work, but they complain. Hopefully that will be enough to prompt people to upgrade. |
If we want to be nice we can easily fix these errors for older Ruby versions. A quick google led me to this: puts res.body if res.response_body_permitted? ^ that would take care of the: |
May resolve some issues if you just check for which version of Ruby is running before executing the ml command to ruby and it error out.
The text was updated successfully, but these errors were encountered: