I'm building a (non-rails) ruby gem, and during development I created a small ruby project that uses the gem so I can test things out as I build it.
In my ruby app, the Gemfile points to the gem like this:
gem 'my_gem', path: '/path/to/my/gem/directory'
Every time I change a line of code in the gem, I want to test it out by running my app. However, my changes aren't loading. The only way I can get the changes to load is by doing: gem uninstall my_gem, gem build my_gem.gemspec, and gem install my_gem-0.1.0.gem.
This takes forever, every time I change a single line of code, it takes about a minute for these 3 commands to run, so I can see my changes when running my app that uses the gem.
From my research it seems like some people have had luck by pushing their gem to github, referencing their gem in their Gemfile with github: my_account/my_gem, and then setting bundle config local.my_gem /path/to/my/gem/directory. However I don't want my gem on github yet, it's nowhere close to done. I tried using this setting anyways, and it didn't work for me, my gem's changes were not being loaded by my app.
There has to be a way for the app to simply reference the gem's ruby code locally (like a require), loading it each time I run the app without uninstalling, rebuilding, and reinstalling every time. I don't see how anyone would develop large/complex ruby gems without being able to do this. Or there must be a way to autoload changes to the gem, etc.
Thanks