Ruby output window


Running simple ruby code puts “John Doe” with Ctl-Shift-b program displays fine in output window. When I use an input prompt such as:
print “Your name:?”
name = gets
puts #{name}
I get a blank window. So far, all other ruby code runs and shows in the output window…I know this sounds like a problem with my ruby coding, but Ive copied code from other sources and still get no output when gets is used.


Since Atom has no ability to run code, you must be using a package. You should identify that package when asking for help. However (because this comes up regularly on this forum), I can tell you that the package you are using is not set up to receive input. If it’s important to you to receive input, a package like termination or script-runner might be better suited to your needs.


Installed both packages but still dont see a window that offers me input. Obvious that I dont know what Im doing. Think ill try to find an IDE that makes it easier for me. Thanks for trying DS.


I don’t think that’s the best approach. You’re learning software development, and the problem you’re running into is a common issue in the open-source community where finding the right answer for you is a matter of being open-minded and willing to learn new things. Picking an IDE that does everything for you will only paper over some of the things you don’t understand currently. For instance, termination lets you run scripts from your system command line and you can interact with your script just like you would in a command prompt window. Once you get used to that beginner-level workflow, you can use hydrogen with the iRuby kernel to run Ruby functions individually without even leaving your document. I don’t develop Ruby, so I haven’t tried that myself, but I’ll totally walk through setting it up with you to make sure everything is in place.

Pick the path that teaches you the most. Otherwise, you’re short-changing yourself.


Thank you for the kind offer. I’m simply a hobbyist who likes programming and languages - by no stretch a developer. Presently learning Python and dabbling in Ruby, and do have an interest in using Atom. I would appreciate your help in better understanding and using Atom. If you have the time to help me, would you prefer to communicate by email or on the Atom forum?


The forum is best; more people can contribute, and other beginners reading it may learn something too.


Same here. That’s part of why I’m fine with some of the manifest inefficiencies of Atom, because the things that make it a bit slower or more effortful to use than other software are the same things that allow you to radically reshape how things work. I don’t have any deadlines or tooling requirements, just a lot of passion projects and an interest in having a single text editor that’s flexible enough to follow me on whatever road I go down.