Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fixing a failed ruby gem install

Tags:

ruby

rubygems

I am installing the ruby gem mysql-dbd on a new system which is running ruby 2.5. The problem is that it gets a syntax error because at 2.4 ruby combined Integer and Fixed num types.

The failed install leaves the unpacked gem package on disk so I was able to examine the entrails and the fix appears to be trivial (as in insert a '#' in a statement to remove the now redundant reference to FixNum).

My question is having fixed the source how do I go about building and installing the gem? Not being familiar with rake.

BTW the gem has long been "unsupported".

like image 525
Russell Fulton Avatar asked Aug 30 '26 10:08

Russell Fulton


1 Answers

I can't get the gem source repository to load, but you've got at least two options:

Locally, you might be able to build it. Try running rake build from the root folder of the gem, and look in the pkg folder for the built gem. You should be able to then gem install pkg/<gem name>.gem in that folder

If you need to share it with others, push the code up on github. Make your change, and if you're using bundler in the codebase that's using the gem, update your Gemfile to point to your source.

like image 119
Jay Dorsey Avatar answered Sep 02 '26 19:09

Jay Dorsey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!