22 Jan 2011, 09:18
Generic-user-small

James West (98 posts)

Hi,
I have been playing around bundle gem as outlined in recent railscast by Ryan Bates (http://railscasts.com/episodes/245-new-gem-with…) and it was this cast that prompted me to find out a lot more about engines, gems and plugins for Rails and how they work hence the purchase of your Crafting Rails Applications book (BTW – thank you for sharing your knowledge) and I find myself confused.

I wrote a couple of engines using bundle gem which I found really easy to install into other apps locally without having to publish them first using the rake build and install commands but now I have built the pdf renderer gem using enginex I find myself struggling to install the gem locally for inclusion in an external (rather than the internal dummy app) for real life integration and I would like to know if there is a simple way to do this and if so perhaps it should be mentioned in the book?

09 Feb 2011, 14:28
28aa4bd_pragsmall

José Valim (26 posts)

James,

The only thing that is probably missing in Enginex is the gemspec. After adding a gemspec, you can easily use it in order applications. If you want to use bundler gemspec, you can do the following:

# Create a new enginex project
enginex your_engine
cd your_engine

# Create a bundler project inside the enginex one and copy the gemfile
bundle gem your_engine
mv your_engine/your_engine.gemspec your_engine.gemspec

# Remove the bundler project, leaving just the enginex one
rm -r your_engine
  You must be logged in to comment