Reputation: 614
I want to add some features to one gem. I've forked this gem on GitHub, add changes and push them. Then I created another rails project and add this gem with GitHub link to my repo. Now I can see changes in this gem work.
Now my workflow is:
Now I want to make my work more intensive, so I need more convenient way to organise my workflow. I want to see changes in gem without pushing to GitHub and so on. How to minimise actions to this:
Update 1
Installing gem with 'path' option seems not help. I add tag to main gem layout, add alert with text. Then I run my main app, and see this alert.
After that I go to the gem folder, change alert text. In main app I do bundle install
and bundle update
, restart main app, but the text in alert didn't change
FINAL
I try to add alert not to layout, but to js script. Now my changes appear as I want. In previous edit my error was that layout is generated once and doesn't change, while scripts are included and can be updated.
Upvotes: 3
Views: 372
Reputation: 8432
If you use bundler you can point gems to a local path. In your Gemfile
:
gem 'madeup', path: '/path/to/gem'
This will allow you to see changes immediately.
It is also worth mentioning that you can point to a GitHub repo as well. Although that won't help you in this instance, it's still useful to know.
gem 'madeup', github: 'http://github.com/user/repo', branch: 'my-branch'
Upvotes: 4