skip to Main Content

I’ve been trying to learn Ruby programming language from the tutorial of freecodecamp but found out that Atom is basically dead. So I decided to use VSCode, everything goes well until I get to the part where I have to ask for user input. When I run it, nothing appears on the terminal.

Mind you, I’m very new to all of this. What can I try next?

enter image description here

2

Answers


  1. I run it fine by (in the terminal)

    ruby userinput.rb
    

    What are you using to run your sourecode?

    Login or Signup to reply.
  2. If you are using VSCode, you need to install:

    1. Ruby language on your Windows box

    2. Ruby extensions for VSCode

    3. Once you get this working, open the "Explorer" widget on the left side of VSCode so you can see the files.

    4. Right click on the Ruby file userinput.rb and choose "Open in Integrated Terminal"

    5. Once in the terminal, run it like so:

      ruby userinput.rb

    Hope this helps!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search