Learning Ruby On Rails: Day 2
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.