Image for post
Image for post

Learning Ruby On Rails: Day 2

Morgan Fogarty
Sep 26, 2018 · 2 min read

A couple months ago I paired on a Ruby on Rails client app. Since then I’ve manually run a script (Rake Task) from that app each day to provide my client with a spreadsheet of info. In the future I’ll make this process automated, but for now this is what I do.

Anyway, today I tried to run the task rake contributions:go but… it failed.

I’d been doing this for months. So, why did it suddenly stop working?

Because last night I installed the latest version of Ruby (2.5.1). And in my Bash profile, chruby is set to use the highest version of Ruby installed.

So when I typed bundle install into the command line and then ran the task, it worked!

But, why did that work!?

Because when I paired on this project months ago, we used Ruby version 2.5.0. So when I typed bundle install the Gemfile dependencies for this project were installed for this new version of Ruby.

That doesn’t really answer my question. For real, why didn’t it work?

The new version of Ruby that this project is now using, did not have this project’s dependencies (Ruby gems) installed in it yet. So I had to install them by bundling.

And now, I’ve spent enough time thinking about what’s actually happening during a bundle. I will move forward, ffs.

Next post, here.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store