0


I'm developing a main rails application where I want to mount some rails engines and gems I've developed on my own.
Some of my (under development) engines depend on the main Application and the engines I've already mounted into the main app.

Now, I want to test, if my engine which is under development also works in my main application together with the already mounted engines and gems.

If I want to test it now, I must commit every singe change with git and install the gem / engine via a GitHub repository in the main app.

Is there a better way to test changes of your engine without having to pollute the git commit history / without commiting every single change and install it via a git repository?

Can I mount my engine locally into the main app, change something and it will be immediately available in the main app?

tshepang
  • 12,111
  • 21
  • 91
  • 136
pmuens
  • 788
  • 6
  • 16

1 Answers1

2

In your Gemfile, you can point gems to your local working copies:

gem 'my_gem', :path => '/my/workspace/my_gem'

See http://bundler.io/v1.3/man/gemfile.5.html#PATH-path-

Alistair A. Israel
  • 6,417
  • 1
  • 31
  • 40
  • That's a really great solution to avoid pushing the Gem to GitHub. But I think I also need to commit every change in the Gem / Engine... Because I think that the Gems / Engines use the "git ls-files"-command to know what files are included in them and what files are available for the main app. Is there a way to avoid it? – pmuens Jul 06 '13 at 11:48
  • 1
    @pmuens Not sure about how your gemspec lists included files. Mine uses `git ls-files` since I use [Jeweler](https://github.com/technicalpickles/jeweler). You can probably patch your .gemspec to just include all files, even those not yet in Git. – Alistair A. Israel Jul 08 '13 at 07:39