Array even and odd indexes sorting and printing its values
It's a good idea to become familiar with all the methods on Array and Enumerable. It just so happens that Enumerable has a method called partition that has a purpose of dividing an array into .two parts (e.g. even and odd). It'll help tidy up your code.

So let's use partition on the array of chars and partition based on index. 

parts = s.chars.partition.with_index{|_,i| i.even?}


Note since we are only using the index, the actual character is unimportant so I used _ instead of a variable name in the partition block. 
Now you have two arrays of characters--let's join each array so that you have a single array with two strings:

strings = parts.map(&amp;:join)


If you don't know about &amp;:join it is a shortcut for {|a| a.join} (using Symbol#to_proc if you want to read up on it).

Then, finally print it. Note that in your code, you intermingle printing with manipulation. This is best avoided if you can; print only once you have things in final form.

print strings.join(' ')


The above could all be put together in one line if you'd rather:

print s.chars.partition.with_index{|_,i| i.even?}.map(&amp;:join).join(' ')