• Skip to primary navigation
  • Skip to content
  • Skip to footer
Peaceful Revolution

      Restore Gem to Original State after Bundle Open

      Experiment with Ruby Gems safely without messing it up

      December 19, 2017 less than 1 minute read

      Image by Joshua Fuller from Unsplash
      Qing Wu

      Qing Wu

      Developer ❤️ Functional Programming

      • Sydney, Australia
      • Website
      • Email
      • Twitter
      • LinkedIn
      • GitHub

      When trying to understand how a gem works,

      bundle open [gem]
      

      can be a very useful command. But after finished debugging, logging and etc., it would be awesome to be able to restore the gem you’ve messed with to its original state. Thankfully there is a command for exactly that:

      bundle exec gem pristine [gem]
      

      Reference: https://github.com/bundler/bundler-features/issues/5

      Tags: bundle, gem, ruby, tiny-tips

      Updated: May 19, 2021

      Share on

      Twitter Facebook LinkedIn
      Previous Next

      Leave a comment

      You may also enjoy

      Talimena Scenic Drive - Road in autumn forest

      Type Narrowing with Custom Functions in Typescript

      February 12, 2023 2 minute read

      Typescript has union types and there are many ways to narrow the types

      Australian Outback

      A Different Perspective for Elixir Macros

      March 21, 2022 4 minute read

      Some random thoughts about Elixir Macros

      Code with Elixir and Phoenix

      Setup Pi-hole on Raspberry Pi

      October 18, 2021 6 minute read

      Install in one place and protect your entire network

      Code with Elixir and Phoenix

      Journey of upgrading an app to Phoenix 1.6

      September 19, 2021 7 minute read

      Say goodbye to webpack and Node in your Phoenix applications

      • Follow:
      • Feed
      © 2023 Qing Wu. Powered by Jekyll & Minimal Mistakes.