# Opinions on Ruby Versions?

**URL:** <https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811>\
**Category:** Ruby-Gnome 2\
**Created:** [March 14, 2012, 12:24am UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811 "2012-03-14T00:24:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 14, 2012, 12:24am UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/1 "2012-03-14T00:24:29Z")

</div>

Hi y’all

I’m doing a rewrite of my Listview class, and I’ve hit a snag.  
Apparently, Ruby v1.8 doesn’t keep its hashtables ordered, but Ruby 1.9  
has fixed this problem.

Should I require that users use Ruby1.9 minimum?

Here’s my problem:

@cols = {}  
@cols[:join] = VR::Calendar  
@cols[:name] = DataObject  
@cols[:quote] = VR::TextCol  
puts @cols.keys.inspect =\> :join, :quote, :name (wrong order!)

This is a problem because my rows appear out of order in the listview.

I know I can write code to keep track of column numbers, but  
that does me no good because users of this class would need to write  
similar code to use my class each time they use it (no good!).

As far as I know, there is no way to fix this, except insist on v1.9.

The problem with 1.9 is that some people (like me) use 1.8. Also,  
Ubuntu, among others still automatically install 1.8. Windows has an  
installer for 1.9 available. I don’t know anything about the Mac.

I would just HATE to have my install instructions say, “Install RVM…”,  
or Upgrade to Ruby 1.9. Uuuuhgh!

Any thoughts?

Thanks,  
Eric

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 14, 2012, 1:53am UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/2 "2012-03-14T01:53:50Z")

</div>

hi Eric,

i mostly use 1.9.3 now, but i used (and still do) 1.8.7 extensively,  
and yes - i think ubuntu still defaults to 1.8.x - but it also has 1.9.1  
available…

i don’t think that requiring a 1.9.x version is such a big deal…  
ordered hash tables are nice, and it’s a trade-off like you say.

just my two cents…

- j

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 14, 2012, 6:46pm UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/3 "2012-03-14T18:46:18Z")

</div>

Hi Eric

I still use ruby 1.8 but I am starting to write code with ruby1.9 and  
breaking compatibility.

Concerning your order issue did you think of using Array or Struct  
object ?  
You did not explain why you need symbols to access your data.  
Struct elements can be accessed by symbols and I believe they are  
ordered.  
This last point needs to be checked.

> **[Class: Struct (Ruby 1.9.3)](https://ruby-doc.org/core-1.9.3/Struct.html)**
>
> Class : Struct - Ruby 1.9.3

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 14, 2012, 6:07am UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/4 "2012-03-14T06:07:41Z")

</div>

I appreciate your input.

But my question really is:

How many people are now using ruby 1.8.x?

The situation I’m trying to avoid is somebody wanting my program who has  
ruby 1.8. Then they may not want to hassle with upgrading ruby, or go  
through “install hell.” (I was there today in fact:) )

Yours,  
Eric

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 15, 2012, 6:05pm UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/5 "2012-03-15T18:05:17Z")

</div>

Just for your information.

In ruby world it seems that only Hash and Array classes are used.  
Here are other classes that can be interesting in some cases:  
Set, OpenStruct, Struct.

I discover them very recently. If you know some more, please share.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 15, 2012, 2:24am UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/6 "2012-03-15T02:24:15Z")

</div>

Hi Vincent:

Thanks for your response. I looked at the Struct class, and it looks  
very interesting. I will definiately use it in my code in the future.

The issue I’m having is that I’m making a listview class for others to  
use. So, the syntax is really important. I need to work with classes  
that people already know well like hash and array. I’m feeding my  
listview column definitions in the constructor:

view = VR::ListView.new( :name =\> String, :date =\> VR::Calendar)

So hashes are a perfect match. But then my listview’s columns are  
randomly ordered because the hash bones me.

I’ve switched to 1.9, and it fixed it.

Thanks for all your great work, I’ve been reading your posts.

Eric

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 25, 2012, 8:32pm UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/7 "2012-03-25T20:32:33Z")

</div>

Hi fer\_f. Thanks for the info.

So, how long do you think it will take for people to be using 1.9? If  
the beta version of ubuntu uses 1.8, then I guess that people won’t be  
transitioning for a long time. That would suck. I just posted that  
visualruby requires version 1.9.

My program actually crashes with 1.8 because my hashtables are out of  
order.

> **[hi合乐888在线登录 - hi合乐手机网页版](http://www.visualruby.net/)**
>
> ♠欢迎点击hi合乐888在线登录,hi合乐手机网页版早就成为了世界性的强大娱乐平台,hi合乐888在线登录提供最新、最好玩、最全的单机游戏中文版下载、资讯、攻略、补丁,致力成为行业风向标。

Eric

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 25, 2012, 8:45pm UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/8 "2012-03-25T20:45:03Z")

</div>

Hi

When packaging your application for a distribution (debian ubuntu), you  
can  
depend on ruby 1.9 and not the default version.  
I guess/hope wheezy+1 will get 1.9 as default.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 25, 2012, 2:58pm UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/9 "2012-03-25T14:58:27Z")

</div>

The fact is that even with “Ubuntu Precise  
Pangolin”:[Ubuntu – Error](http://packages.ubuntu.com/precise/ruby) (still beta) or  
“Debian Sid”:[Debian -- Details of package ruby in sid](http://packages.debian.org/sid/ruby) (always beta :-), the  
ruby package uses Debian’s default Ruby version (currently 1.8.x).

Yes, you can install the “ruby 1.9” package, but what people get when  
they do “apt-get install ruby” is ruby1.8, so there’s a lot of people  
using it.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 26, 2012, 3:01pm UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/10 "2012-03-26T15:01:29Z")

</div>

Le Sun, 25 Mar 2012 20:32:33 +0200,  
“Eric C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) a écrit :

> So, how long do you think it will take for people to be using 1.9?  
> If the beta version of ubuntu uses 1.8, then I guess that people  
> won’t be transitioning for a long time. That would suck. I just  
> posted that visualruby requires version 1.9.

Afaik, debian and its derivative will use 1.8 for several years.  
However, they provide 1.9 as well. the naming might be confusing  
though. The “nosuffix” ruby is 1.8, and the “1.9.1” suffix is for  
1.9.x . And it’s unlikely they will change this as this would break  
running system without any benefit.

If I’m not mistaken :

- With 1.9 :  
Windows  
Debian (Ubuntu/Mint) (package ruby1.9.1)  
Archlinux  
Fedora 17

- Without 1.9  
Fedora 16  
RHEL 4,5,6 (CentOS, Scientific)

I dont use other distributions.

So yes, just require 1.9, it’s the present. Imo, there is no reason to  
begin a new big project with 1.8 in mind.

Simon

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [March 28, 2012, 7:30pm UTC](https://www.ruby-forum.com/t/opinions-on-ruby-versions/217811/11 "2012-03-28T19:30:26Z")

</div>

> How many people are now using ruby 1.8.x?

I am still using Ruby 1.8.x due to the Encoding issues on 1.9.x

One day I will switch in a way as to start from scratch with ruby 1.9.x  
but until then, as Encoding gives me nothing I need, I am sticking to  
the ruby version I am in love with - which is 1.8.x.

> The situation I’m trying to avoid is somebody wanting my program who  
> has ruby 1.8. Then they may not want to hassle with upgrading ruby,  
> or go through “install hell.” (I was there today in fact:) )

If a program is offering only 1.9.x I can not and will not use it.

You must however also understand that matz has said the only ruby  
version that he will support is + 1.9.x, and 1.8.x will eventually die  
out sooner or later.

So I think it is ok to eventually tell people to switch to 1.9.x, and if  
they dont then it is their problem.

I accept that for myself and still use 1.8.x. 🙂
