# Each\_char

**URL:** <https://www.ruby-forum.com/t/each-char/185017>\
**Category:** Ruby\
**Created:** [March 11, 2010, 8:54pm UTC](https://www.ruby-forum.com/t/each-char/185017 "2010-03-11T20:54:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![murloc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ebca7d/32.png) [@murloc](https://www.ruby-forum.com/u/murloc)\
**Post date:** [March 11, 2010, 8:54pm UTC](https://www.ruby-forum.com/t/each-char/185017/1 "2010-03-11T20:54:05Z")

</div>

Hello

Im new to ruby and programming and I saw a guy do this on a tutorial  
video:

“Hello”.each\_char do |x|  
puts x  
end

The result was that it printed one letter in the string at a time until  
it had printed the whole word “Hello” in a vertical line. My problem is  
that this wont work when I try it and I’ve done exactly like he did it.  
The only thing I can think of is that maybe I have another version of  
ruby than he has, but perhaps anyone of you knows the answer?

---

<div class="post-metadata">

**Author:** ![murloc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ebca7d/32.png) [@murloc](https://www.ruby-forum.com/u/murloc)\
**Post date:** [March 11, 2010, 8:57pm UTC](https://www.ruby-forum.com/t/each-char/185017/2 "2010-03-11T20:57:55Z")

</div>

what version of ruby are you running? It works for me on 1.9.1 on  
windows. Try this:

> “Hello”.each\_byte { |x| puts x.chr }

---

<div class="post-metadata">

**Author:** ![murloc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ebca7d/32.png) [@murloc](https://www.ruby-forum.com/u/murloc)\
**Post date:** [March 11, 2010, 9:18pm UTC](https://www.ruby-forum.com/t/each-char/185017/3 "2010-03-11T21:18:27Z")

</div>

David V. wrote:

> Thanks, the example you made works (alto I didnt fully understand it).

I think the 1.8x version of Ruby’s string implementation is in another  
module: jcode. I believe you can run your original code, you just have  
to require ‘jcode’.

> Im about 95% sure that I am running ruby 1.8.6 since I just used the  
> one-click installer that’s on [ruby-lang.org](http://ruby-lang.org). Why dont they have a  
> one-click installer for the latest version of ruby? XD

I don’t know why they haven’t packaged a more up-to-date one-click  
installer. They do have the 1.9.1 version pre-built for windows. I’m  
running it and it works great.

---

<div class="post-metadata">

**Author:** ![murloc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ebca7d/32.png) [@murloc](https://www.ruby-forum.com/u/murloc)\
**Post date:** [March 11, 2010, 9:39pm UTC](https://www.ruby-forum.com/t/each-char/185017/4 "2010-03-11T21:39:16Z")

</div>

Brandon J. wrote:

> I don’t know why they haven’t packaged a more up-to-date one-click  
> installer. They do have the 1.9.1 version pre-built for windows. I’m  
> running it and it works great.

Because it’s a lot of work 🙂

---

<div class="post-metadata">

**Author:** ![murloc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ebca7d/32.png) [@murloc](https://www.ruby-forum.com/u/murloc)\
**Post date:** [March 11, 2010, 9:03pm UTC](https://www.ruby-forum.com/t/each-char/185017/5 "2010-03-11T21:03:12Z")

</div>

Brandon J. wrote:

> what version of ruby are you running? It works for me on 1.9.1 on  
> windows. Try this:
> 
> > “Hello”.each\_byte { |x| puts x.chr }

Thanks, the example you made works (alto I didnt fully understand it).

Im about 95% sure that I am running ruby 1.8.6 since I just used the  
one-click installer that’s on [ruby-lang.org](http://ruby-lang.org). Why dont they have a  
one-click installer for the latest version of ruby? XD

---

<div class="post-metadata">

**Author:** ![murloc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ebca7d/32.png) [@murloc](https://www.ruby-forum.com/u/murloc)\
**Post date:** [March 11, 2010, 11:01pm UTC](https://www.ruby-forum.com/t/each-char/185017/6 "2010-03-11T23:01:58Z")

</div>

On 3/11/2010 1:39 PM, Aldric G. wrote:

> Brandon J. wrote:
> 
> > I don’t know why they haven’t packaged a more up-to-date one-click  
> > installer. They do have the 1.9.1 version pre-built for windows. I’m  
> > running it and it works great.
> 
> Because it’s a lot of work 🙂

As I understand it, there will be no more ‘one-click’ installers. The  
new ‘official’ windows installer is [http://rubyinstaller.org/](http://rubyinstaller.org/) which does  
indeed have Ruby 1.9.1. A word to the wise, I’d suggest uninstalling  
the old one-click, before installing the new rubyinstaller to avoid any  
path confusions.
