Skip to content

Instantly share code, notes, and snippets.

@rubyisbeautiful
Last active December 13, 2016 14:17
Show Gist options
  • Save rubyisbeautiful/aaf7e45d1ef3b48d3f64 to your computer and use it in GitHub Desktop.
Save rubyisbeautiful/aaf7e45d1ef3b48d3f64 to your computer and use it in GitHub Desktop.
Force removal of JSON 1.8.1
#!/bin/bash
# TODO: get ruby version from rbenv
# TODO: match major.minor version of rbenv_ruby_version to be use in path that is hardcoded
# rbenv_ruby_version=$(rbenv local)
ruby_version="2.2.6"
ruby_path="2.2.0"
mv /apps/opt/rbenv/versions/$ruby_version/lib/ruby/gems/$ruby_path/specifications/default/json-1.8.1.gemspec /apps/opt/rbenv/versions/$ruby_version/lib/ruby/gems/$ruby_path/specifications
gem uninstall json -v '1.8.1'
echo "done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment