From: "Bob Wickham" <wickham_bob / yahoo.com.au>
>
> puts 'What is your favourite number?'
> number = gets.chomp
> puts 'I think ' +  (number.to_i + 1.to_i) + ' is a better number'
> 
> results in this error "cannot convert Fixnum into String (TypeError)"

One way:

  puts 'I think ' +  (number.to_i + 1).to_s + ' is a better number'

Another way (note double quotes instead of single quotes):

  puts "I think #{number.to_i + 1} is a better number"


Hope this helps,

Bill