Ruby ver, 2 o 1.9? & Problema con unicode

Ciao a tutti, ho cominciato a dare un’occhiata a ruby. Ho installato la
versione 2.0.0 tramite il RubyInstaller. Anzitutto vorrei sapere se è
consigliato partire dalla versione 2 oppure dovrei cominciare dalla
1.9.3.
Inoltre ho un problema con dei programmi. All’inizio di essi io
inserisco la stringa “#encoding: utf-8”, utilizzo caratteri accentati,
ma quando vado a compilare il programma mi viene restituito l’errore:
‘invalid multibyte char (UTF-8) syntax error, unexpected tIDENTIFIER,
expecting end-of-input’.

A cosa è dovuto? Vi ringrazio in anticipo per le risposte :slight_smile:

Well this is a English speaking forum, but I think I understand your
problem. Is not sufficient to write “#encoding: utf-8” in the first line
of your *.rb files, also you have to set the encoding of the file from
your IDE to UTF-8. The both things will make stuff work as you want.

Damián M. González wrote in post #1148700:

Well this is a English speaking forum, but I think I understand your
problem. Is not sufficient to write “#encoding: utf-8” in the first line
of your *.rb files, also you have to set the encoding of the file from
your IDE to UTF-8. The both things will make stuff work as you want.

Yes, you’re right! I solved :slight_smile:

Ciao, sono nuovo su Ruby e vorrei imparare questo linguaggio da zero.
se mi potreste dare delle guide per RUBY-JRUBI-RAIL-ECC…
se ce una Virtual Machine e i pregi/difetti.
vi ringrazio