[Jruby-extras-devel] WAR'ing a RoR app

Robert Egglestone robert at cs.auckland.ac.nz
Fri Dec 1 17:41:08 EST 2006


Yesterday I had a look into rake and putting some stuff together.

Regardless of how it's exposed, if it's written in Ruby will allow us to 
make better packaging decisions than were possible previously. For 
example, having the routing information means we don't need FileServlet.

I guess we have to support at least a standalone war, a shared war (no 
JRuby or gems inside the war), and a normal Rails webapp on disk. The 
extra gems required for a standalone war mean a bit more work is required.

One area I'm not sure about is the rb.ast compilation. Should we aim to 
do this to all packaged Ruby files? Currently Rails loads slowly, will 
this significantly speed it up?

I'm also not sure about how to distribute the builder. I'd like to be 
able to install a gem and a new generator becomes available or a new 
Rake task shows up. However I don't know how to do this, or if it's 
possible. We could install a Rake task lib from a gem, but I suspect 
only the Rails tasks and those in webapp/lib/tasks are included by default.

Cheers,
Robert


Fausto Lelli wrote:
> Hi Robert,
>
> Although  I'm totally swamped at work and a total newbie in these fields,
> I'd like to help. What do you think of Charles proposal of having a generator ?
> If that should be the case I think the hardest part is understanding where
> to put on the new stuff, rather than creating the script itself.
>
> The script should zip all the rails-webapp directory itself
> and add the WEB-INF dir filled with the web.xml and the
> lib/rails-integration.jar,
> the only parameter to be passed in being the location of the jruby_home,
> and optionally putting all jruby jars into the lib directory.
>
> Is it correct ?
> Cheers,
> Fausto
>
> On 11/30/06, Robert Egglestone <robert at cs.auckland.ac.nz> wrote:
>   
>>  Building the war file will most likely take the form of a Rake task,
>> however as far as I know no-one has had a look at doing this yet.
>>  I'll have a go at it this weekend.
>>
>>  Cheers,
>>  Robert
>>
>>
>>
>>
>>  Ashish Sahni wrote:
>>  Thats great ! For a ruby newbie like can you clarify ...
>>
>> Currently the ruby dependencies seem to be
>> 1. JRuby runtime interpreter
>> 2. Rails framework libraries
>> 3. Rails-integration glue code
>> 4. RoR application code.
>>
>> Is the goal of the complete-ruby to have all of these dependencies
>> bundled as one ?
>> Also, how are we envisioning the ruby developers to use this facility to
>> go from
>> have a RoR app to a war file in one-magical-command ?
>>
>> Thanks
>> Ashish
>>
>> Charles Oliver Nutter wrote:
>>
>>
>>  Ashish Sahni wrote:
>>
>>
>>
>>  Hi Folks,
>>
>> I guess one of the (obvious) goals of the rails-integration project would be
>> to come up with a simple way via which a standard RoR app can be bundled
>> as a WAR file.
>>
>> Would rake file be the candidate here ? Also, when is
>> rails-integration-snapshot
>> going to make it as a separate binary downloadable ?
>> Any other thoughts on the matter ?
>>
>>
>>  I'm obviously super interested in Rails-in-a-WAR, since suddenly Rails
>> gets all the deployment benefit of a classic Java web application. And I
>> believe it's possible; I already have an ant target that creates a
>> complete Ruby interpreter in a single jar; the next step of stuffing
>> Rails and a Rails app in there doesn't seem far away...
>>
>>
>>
>>  _______________________________________________
>> Jruby-extras-devel mailing list
>> Jruby-extras-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel
>>
>>
>> _______________________________________________
>> Jruby-extras-devel mailing list
>> Jruby-extras-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel
>>
>>
>>     
> _______________________________________________
> Jruby-extras-devel mailing list
> Jruby-extras-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/jruby-extras-devel
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20061202/3a4d6d67/attachment.html 


More information about the Jruby-extras-devel mailing list