Using Racket in Atom - Script and Lang package already downloaded


I’m a new comp sci student and we’re starting out using Racket; I downloaded DrRacket and it’s working fine on my computer. What’s the problem? The problem is I’m a vain little sh*t and I like atom a lot better so I want to code my projects in it because it’s pretty and I’m comfortable with it. I’ve downloaded the Script and Racket Language packages already, those are installed and the syntax is showing up fine but it won’t run.

I already used the same techniques that I did to configure python 3 as a profile and it was still a no go. It just keeps telling me to boot atom using terminal (which I did). Is there something I’m just totally missing? I basically know how to add numbers in Python and Java and I’ve been fiddling around with terminal for not very long so I’m really stumbling around in the dark here. If you can give me something to feed into terminal or instructions that would help a five year-old configure a profile in atom. My computer is running OS X Sierra, for reference.


What techniques, exactly?

It just keeps telling me to boot atom using terminal (which I did).

What keeps telling you this?

Do you also have Python 2 installed? If you make a Python script (let’s call it and you run it with python in the terminal, what happens?


packages > script > configure script
input path of python 3, name profile “python 3”

The code interpreter gives me an error message: Unable to Run racket / Did you start atom from the command line? / atom . / Is it in your PATH? PATH: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin

I do have Python 2 installed; if I write

Save that to a file, and run it just like you said, it does what it should. Same if I write the same in python3 and run it with python3 in the terminal.


Okay, I think I misunderstood at first. What happens when you try to run a Racket file from the terminal like racket test.rkt?

You’re having difficulties because the process that’s running Atom doesn’t know where to find a Racket executable. If you can’t run a Racket script from the terminal, then that would mean that there’s no executable file in your PATH. If you can run it from the terminal but not from Atom, that means that it’s not getting passed to Atom somehow (maybe you opened Atom from a terminal window that you had opened before you installed Racket). This could also be a permissions issue, if, for example, you installed Racket with sudo.


Yeah, that was the problem! I finally figured it out on my own and fixed it after editing .bash_profile like 15 times, but yes. :slight_smile:


Yeah, you’ll get better at troubleshooting these things. For problems like this, it’s largely a matter of getting used to how things are structured behind the desktop metaphor, and then it becomes easy.