Ruby gem equivalent of "pip install -e"?
Question: In Python I can install a package from source in ["editable"
mode](https://pip.pypa.io/en/latest/reference/pip_install.html#editable-
installs) using `pip install -e`. Then I can carry on editing the code, and
any changes will be automatically picked by other Python scripts that `import
library`

Is there a comparable workflow for developing Ruby gems? What is the "Ruby
way" of using libs as they are being developed rather than, for example,
compiling and installing a gem every time I make a change to the source?


Answer: There are two common approaches one might use with `bundler`:

  1. one executes `bundle install --path vendor/bundle` and _does not run`bundle update` unless everything is tested_.
  2. one tells a bundler to use a local version of the gem: 
     * in `Gemfile` (this is not supported in `mymaingem.gemspec` due to rubygems maintainence issues): `gem 'mycutegem', :git => 'git://github.com/myname/mycutegem', :branch => 'master'`;
     * in command line: `bundle config local.mycutegem /path_to_local_git/mycutegem`.

The first approach will download everything into subfolder of your current
project (here it’d be `vendor/bundle`.) Feel free to modify everything there,
it’ll be reflected.

The second approach is likely better. You are to clone the gem from github and
instruct `bundle` to use your local clone of the respective git repository.
This approach provides you with an ability to publish the changes to your main
gem into the repository. As soon as dependent repo is published as well, the
up-to-date version will be retrieven by your gem subscribers, assuming they
have not instructed their `bundler`s to use their locals.

Hope this helps.

