Womenintech Part 3: First Steps With Ruby And Chef



After my first steps in programming with Ruby, I was assigned to write a program for our company to automate a process. The task I should automate, takes quite a long time if you do it by yourself, and that’s what we want to avoid. First I had to extract information from a website where our content is stored. Afterwards I expanded the code until we had our required output. Of course, it took me some iterations, because I’m new to Ruby. After the basic framework was set up, the program had to be rewritten to work with the API of the website. Working with this API brought some problems. First, there doesn’t exist a documentation and the API isn’t finished yet. Second, I’ve never worked with an API and JSON before. The information I needed is nested, so I had to take a closer look to figure out how it works. Therefor, my chef Edmund did a code review with me. He explained how some things could be done in an easier way and how to get the information needed from the API.

After spending some time and with his tips and tricks, I got quite comfortable with it. As my program was almost finished, I did a test run. There I figured out, that it doesn’t do all the things I had expected. After some improvements, I finally come closer to finish this project.


Besides I take a closer look at Chef. I started with the course on learn.chef.io. As a next project, I write a cookbook for our company that should ease our daily work. Therefor, my colleague Jürgen gave me a introduction how to work with Chef on my workstation. First thing I did, was to figure out how to run chef-client locally. It’s an agent that runs locally on every node that is under management by Chef. After installing a few things, which I actually didn’t need, I made a cookbook and a recipe to create new users, for testing. Then I tried to execute it, which ended up with a lot of error messages.

At this moment, I decided to start again from the beginning. After some research, I realized that it wasn't really necessary to install or download so many things. I just needed the right command to execute my files. Now, after the basic things are running, I can start to write a cookbook for our requirements.

From time to time Edmund and Jürgen give me feedback on my work to figure out what could be done better. They also help me to improve my skills and I can ask them any questions. In my opinion, these small projects are a pretty cool way to learn to work with new technologies.

Go Back explore our courses

We are here for you

You are interested in our courses or you simply have a question that needs answering? You can contact us at anytime! We will do our best to answer all your questions.

Contact us