+ 3
alguem pode me ajudar. ../Playground/:85:in `<main>' : undefined : method `chomp' for nil:NilClass (NoMethodError)
Hello, I'm new to Ruby, I started to learn Ruby now, and I have a problem with calling gets, I call and this error, but it is called previously in the code in the same way and it works without any problems. Olá eu sou novato em Ruby, começei a aprender Ruby agora, e estou com um problema para chamar o gets, eu chamo e da esse erro, porem ele é chamado anteriormente no código do mesmo jeito e funciona sem problema nem um.
8 ответов
+ 2
Thanks for your attention, and sorry for the obvious failures, is that I'm a beginner in the language itself, I already solved the problem and the solution was quite simple by the way.
But if you want to leave suggestions the code link is there and it is open to suggestions.
Obrigado pela a atenção de vocês, e desculpem as falhas obvias, é que eu sou iniciante na linguagem mesmo, eu já resolvi o problema e a solução foi bem simples até.
Porém se quiserem deixar sugestões o link do código esta ai e ele é aberto a sugestões.
+ 2
is because in computer you have the response of your system, but in playground code you have just one response.
In the Playground you have to separate the entries in ex lines: Line 1 - The input of the first gets of the code, Line 2 - The input of the second gets of the code, Line 3 - The input of the third gets of the code ...
+ 1
Link to your code ☺
+ 1
This is a link to your code (for other people answering)
https://code.sololearn.com/cbE5OTEWnjGh/?ref=app
+ 1
yes!
0
Never apologise for being a beginner. I'll try to check it out later.
0
gets.chomp is undefined when I try it. It doesn't seem to work in the Coding Playground. Have you tried it via a command line on your computer?