I've started writing a Ruby script which will be called as part of
rake db:seed, and it looks like this:
When I try to run it, I get:
cannot load such file -- mysql
However, I can use
require 'mysql' from within irb, and I can do this:
$ gem query --local | grep mysql
Does anybody know what's up?
e: for fun, I put
puts Gem.path at the top of my script, and got:
Compare that to
Answered. I had to add the following lines in my Gemfile:
After that, I ran
bundle install and it worked.