问题 I'm testing a gem in a Rails project. The current Gemfile: gem 'mygemname', path: '/path/to/my/gem' When I edit a gem locally I can build the gem, remove the gem from Gemfile , run bundle install , add the gem back to the Gemfile and run bundle install again. Is there an easier way to do this locally? 回答1: If you use bundle config local.GEM_NAME /path/to/local/git/repository from the command line then every time you reload your application it will load the latest source from your file system.