Shail Patel
Shail Patel

Reputation: 1814

Gems install under vendor/bundle in rails app local testing

I have a rails app that I'm running locally where the gems are installed in the vendor/bundle directory. I want to add some debugging statements to a gem and then test it locally. I'm running bundle exec rackup config.ru to run the server. I've tried rerunning bundle install before starting the application, but that still doesn't seem to pick up my changes. Any ideas?

Upvotes: 1

Views: 1852

Answers (1)

Tim Moore
Tim Moore

Reputation: 9482

Running bundle show --paths will print out exactly where Bundler is loading your gems from, so you can double-check that against the files you are editing.

As a shortcut, bundle open <gemname> will open that gem's directory in your editor of choice (whatever your EDITOR environment variable is set to). You can then edit it directly there.

There is normally no need to re-run bundle install or rebuild the gem when you edit files this way.

Upvotes: 2

Related Questions