I'm having a hard time following what you want out of this, so apologies if
I ask some possibly silly questions.

...

<snip>
>


 So, I'd like to know what is the recommended way for including RubyGems
> support while embedding JRuby.


Perhaps the question is more complicated than this, but have you seen Nick
Sieger's Warbler <https://github.com/jruby/warbler> gem or
gems-in-a-jar<http://blog.nicksieger.com/articles/2009/01/10/jruby-1-1-6-gems-in-a-jar>,
which explains how you can bundle any number of gems into a jar with the
jruby-complete.jar with it?  You could probably script out the gems-in-a-jar
to create something for you bundled up (especially if you use Maven or the
Maven Ant plugin).  It also appears that Warbler will let you just bundle an
entire repo of things into a .jar, so it might very well do what you're
wanting out of the box.  I don't know.

 My initial thoughts was to create a Gemfile including Capybara and Rspec
> and run "bundle install src/ruby/gems". Then, I would create my specs under
> src/ruby/specs and would like to be able to run "require 'capybara-rspec'"
> from there.


If you just need the gems as artifacts for use, you might be able to just
use `bundle package`, then include them into the .jar, but that would
require some prototyping (I'm not too familiar with whether this is possible
or not).


>
> I also hope to be able to use the classes defined in my Grails application
> from inside the specs, like my GORM domain classes.
>
>
For that, you'd probably need to compose which methods you want to expose in
shims such as what Yoko Harada demonstrated with
RedBridge<http://redbridge-at-strangeloop2011.herokuapp.com/slideshow>
 integration.

 ...
> <snip>

Any ideas will be greatly appreciated.
>

Just some simple Googling, but I see that someone took Compass and ported it
to Grails, called Grass <https://github.com/altosz/grass>.  There's also
apparently a Grails-Ruby <http://grails.org/plugin/ruby> plugin out there.
 That might include most of the functionality you're looking for (embedding
Ruby into Grails, potential shimming of methods/functions).  In any event,
I'm not familiar enough with Grails to comment on any of that, but reading
code is always useful when it deals directly with the domain you're trying
to dig into.

But these are just my two cents.  May they be useful to you.  If not, good
luck with the project nonetheless.

-Nick Klauer

Reply via email to