Answer the question
In order to leave comments, you need to log in
RUBY - connect class?
I started learning Ruby - I mastered the base a little, tutorials.
I wrote a script - it works. I added a file with a class next to the script, how to use the class in my script?
Since when I try to use it I get an error: `require': cannot load such file -- topic
The code itself looks like this:
require 'topic'
.....
topic = Topic.new
.....
ruby app.rb
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question