Pablo Fernandez
Pablo Fernandez

Reputation: 287450

How do I make Rails pick up gems from local source directories?

I'm creating a few gems by extracting out parts of a Rails project that can be reused (and that I have duplicated in other Rails projects). The problem I have is that testing every change to the gems is now very slow.

Changing a Rails project is very fast as most of the time the change is re-loaded automatically, but changing a gem implies:

Is there a way for my Rails project to pick up the code from where I have the gem code, instead of the installed gem, to speed up development?

Upvotes: 2

Views: 623

Answers (1)

ScottJ
ScottJ

Reputation: 1092

You could run rake gems:unpack to unpack the installed gem into the vendor/gems directory, then make your edits there.

If you want to keep your code where it is, you can symlink from vendor/gems to it. It'll give you warning and it'll be nasty, but it'll work.

Upvotes: 2

Related Questions