Reputation: 73
I was debugging a gem a while ago and accidentally left in some code that causes my project to hang when it makes use of that gem. How can I restore the clean source? Is the only option to uninstall and reinstall?
Upvotes: 1
Views: 185
Reputation: 84114
The command
gem pristine foo
Does this for the gem of that name. You can also pass --all
to rebuild all gems. This works by comparing what's in the .gem file (which is a tar archive in disguise) with the actual files. More details in the documentation
Upvotes: 1
Reputation: 106792
Uninstall that gem with gem uninstall <gem_name>
and then reinstall via gem install <gem_name>
or bundle install
.
Upvotes: 1