How to use Terminal to test exercises after setting up environment

Hi team,

We were using during Jumpstart so I’m new to using Terminal to test code after editing it in Atom.

I have downloaded the Methods Exercises folder that can be accessed using this link:

I have a good conceptual understanding of rspec and the reason we are using it but I need help with the first steps. The folder mentioned above includes a lib subfolder with the rb file for my work and a spec subfolder for testing. Any (dummy proof) help would be appreciated!

Thank you!

  1. Click download link to download archived project folder
  2. Open the folder in Finder (on Chrome I like to click the arrow next to the downloaded folder and click “Show in Finder”)
  3. Double click the archive folder to extract the contents in the current directory
  4. Open the Terminal application
  5. Make sure the Terminal application is pinned to your dock for easy access by right clicking it in your dock and selecting Options > “Keep In Dock”
  6. Drag the newly extracted folder from Finder down to your dock and drop it onto the Terminal application (this is an easy way to change directory into that folder!)
  7. Run the bundle install command to install the gems specified by the Gemfile
  8. Run thebundle exec rspec --color command to run your tests
  9. Run the atom . command to open up the current directory in the atom text editor
  10. Open the lib folder and write the code to pass the specs (Yay we are programmers!)
  11. Return to the Terminal and run the specs again until everything is passing

Let me know if this helps!

Kevin, you hit the nail on the head. That was perfect.
Thank you very much!

Just follow up.
I found this error message on my setup.
Anyone can help?

Hey Luke, I have just been telling people to disable the Rubocop linter in settings > packages for now we can fix it when you start at App Academy. Until then, it is better practice to proof read your code and handle the errors if they come up.

Hi, I’ve been having a problem getting going with this as well. Typing bundle install just returns an error saying command not found. I’m just running ruby in a repl for now, but how can I get this working?

I’m having the same problem. Find a solution yet?

Unfortunately, it still isn’t working. Typing in bundle install simple says command not found. Is there something I’m supposed to be typing in alongside that?

@akeefe09 could you copy and paste your terminal prompt here? Or better yet, take a screenshot?

I got some new problem. Now I’m getting this error message every time I open terminal.

akeefe09, can you try quitting your terminal altogether (Cmd+Q) and see if you still get that message?

For what it’s wort, the message is related to your JavaScript environment, not your Ruby environment.

yes, I have quit terminal and tried restarting my computer and it’s still messed up.

can someone please help with this? I’m very far behind in this course now because my computer is screwed up after all these installations.

Alexander, I’ve sent you a DM. We’ll get this resolved :slight_smile:

@kevin This was massively helpful! Is it possible to add these notes to the alpha curriculum directly on the Methods Exercise page? I’m just starting the alpha course and was lost as to how to run code in the terminal until I read your steps, Kevin. I think it would be great for future learners to have these steps more explicitly outlined in the curriculum.