{"id":13484025,"url":"https://github.com/postmodern/gem_home","last_synced_at":"2025-03-16T19:33:07.896Z","repository":{"id":18304260,"uuid":"21481065","full_name":"postmodern/gem_home","owner":"postmodern","description":"A tool for changing your $GEM_HOME","archived":false,"fork":false,"pushed_at":"2021-11-03T15:24:24.000Z","size":43,"stargazers_count":118,"open_issues_count":5,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-27T12:45:38.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postmodern.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-04T00:43:44.000Z","updated_at":"2024-01-22T13:43:20.000Z","dependencies_parsed_at":"2022-08-25T11:30:33.660Z","dependency_job_id":null,"html_url":"https://github.com/postmodern/gem_home","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fgem_home","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fgem_home/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fgem_home/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fgem_home/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postmodern","download_url":"https://codeload.github.com/postmodern/gem_home/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826798,"owners_count":20354221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:01:18.209Z","updated_at":"2025-03-16T19:33:07.603Z","avatar_url":"https://github.com/postmodern.png","language":"Shell","funding_links":[],"categories":["Environment Management","Shell"],"sub_categories":[],"readme":"# gem_home\n\n[![Build Status](https://travis-ci.org/postmodern/gem_home.png)](https://travis-ci.org/postmodern/gem_home)\n\nChanges your `$GEM_HOME`.\n\n## Features\n\n* Updates `$GEM_HOME`, `$GEM_PATH` and `$PATH`.\n  * Switches `$GEM_HOME` by pushing and popping gem directories to `$GEM_PATH`.\n    This allows the stacking of multiple gem directories.\n  * Prepends the new `$GEM_HOME/bin` to `$PATH` so it takes precedence.\n* Compartmentalizes gems into `.gem/$ruby_engine/$ruby_version`.\n* Plays nicely with [RVM] and [chruby].\n* Supports [bash] and [zsh].\n* Small (~90 LOC).\n* Has tests.\n\n## Synopsis\n\nChange the `$GEM_HOME`:\n\n    $ gem_home /path/to/project\n\nRevert the `$GEM_HOME`:\n\n    $ gem_home -\n\nUsing with bundler:\n\n    $ cd padrino-app/\n    $ gem_home .\n    $ bundle install\n    Fetching gem metadata from https://rubygems.org/.........\n    Resolving dependencies...\n    Using rake 10.3.2\n    Using i18n 0.6.11\n    Using json 1.8.1\n    Using minitest 5.4.0\n    Using thread_safe 0.3.4\n    Installing tzinfo 1.2.2\n    Using activesupport 4.1.4\n    Using addressable 2.3.6\n    Installing builder 3.2.2\n    Using bundler 1.6.2\n    Using data_objects 0.10.14\n    Using dm-core 1.2.1\n    Using dm-aggregates 1.2.0\n    Using dm-do-adapter 1.2.0\n    Using dm-migrations 1.2.0\n    ...    \n    $ padrino console # no `bundle exec` needed\n\n* Notice how bundler re-used many of the gems from `~/.gem/...` but installed\n  missing gems into `$PWD/.gem/...`.\n\n\n## Install\n\n    wget -O gem_home-0.1.0.tar.gz https://github.com/postmodern/gem_home/archive/v0.1.0.tar.gz\n    tar -xzvf gem_home-0.1.0.tar.gz\n    cd gem_home-0.1.0/\n    sudo make install\n\n### PGP\n\nAll releases are [PGP] signed for security. Instructions on how to import my\nPGP key can be found on my [blog][1]. To verify that a release was not tampered \nwith:\n\n    wget https://raw.github.com/postmodern/gem_home/master/pkg/gem_home-0.1.0.tar.gz.asc\n    gpg --verify gem_home-0.1.0.tar.gz.asc gem_home-0.1.0.tar.gz\n\n### Homebrew\n\ngem_home can also be installed with [homebrew]:\n\n    curl https://github.com/postmodern/gem_home/blob/master/homebrew/gem_home.rb\n    brew install --HEAD -s gem_home.rb\n\n## Configuration\n\nAdd the following to the `~/.bashrc` or `~/.zshrc` file:\n\n``` bash\nsource /usr/local/share/gem_home/gem_home.sh\n```\n\n### System Wide\n\nIf you wish to enable gem_home system-wide, add the following to\n`/etc/profile.d/gem_home.sh`:\n\n``` bash\nif [ -n \"$BASH_VERSION\" ] || [ -n \"$ZSH_VERSION\" ]; then\n  source /usr/local/share/gem_home/gem_home.sh\n  ...\nfi\n```\n\nThis will prevent `gem_home` from accidentally being loaded by `/bin/sh`, which\nis not always the same as `/bin/bash`.\n\n## Uninstall\n\nAfter removing the `gem_home` configuration:\n\n    $ sudo make uninstall\n\n## Alternatives\n\n* [gs](https://github.com/inkel/gs#readme)\n* [gst](https://github.com/tonchis/gst#readme)\n* [ohmygems](http://blog.zenspider.com/blog/2012/09/ohmygems.html)\n* [renv](https://github.com/fnichol/renv)\n\n[RVM]: https://rvm.io/\n[chruby]: https://github.com/postmodern/chruby#readme\n\n[bash]: http://www.gnu.org/software/bash/\n[zsh]: http://www.zsh.org/\n\n[PGP]: http://en.wikipedia.org/wiki/Pretty_Good_Privacy\n[homebrew]: http://brew.sh/\n\n[1]: http://postmodern.github.com/contact.html#pgp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostmodern%2Fgem_home","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostmodern%2Fgem_home","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostmodern%2Fgem_home/lists"}