I get a syntax error, when I execute the following code within the rails console: "syntax error, unexpected $end, expecting keyword_end"
range = 2
my_array = Array.new(range)
a = [1]
i = 0
while i < range do
a.each do |b|
puts "test"
end
i += 1
end
Does anyone know what I am doing wrong? The strange thing is, that the code is working on my server within a ruby file.
Thanks a lot!
tuxware