Question

I have two projects that are version controlled in their own respective private GitHub repositories.

One of them is a Rails app, and the other one is a Rails engine.

I do not want to expose the Rails engine as a public gem.

How can I declare my Rails app has a dependency on the engine in such a way that Heroku can resolve it?

Was it helpful?

Solution 2

Assuming that your engine is a gem in a private Github repository, you can try this approach, which uses an OAuth token:

https://gist.github.com/masonforest/4048732

As noted in the comments, the version which involves hardcoding the OAuth token value in your Gemfile is less secure than using an environment variable.

OTHER TIPS

You can use a private gem server like Gemfury. It is also a Heroku addon (free plan works fine for your case).

This way you'll be able to release versions of your gem. Works much like rubygems, but is private.

You can vendor your engine by placing the source in the vendor folder, then in your Gemfile reference it by path:

# Gemfile
gem 'some_engine', path: 'vendor/some_engine'

Either directly copy-paste the source there, or use a Git submodule. Run bundle install and you should be set.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top