How to setup a vertx project with Ruby?

338 views
Skip to first unread message

bern

unread,
Aug 15, 2016, 7:35:47 AM8/15/16
to vert.x

Hi,

I'm having some hard time understanding how to develop with vertx on top of Ruby. Is there any sample how to set up an environment of vertx with Ruby? Is it possible at all to set up a project in Ruby using vertx or is vertx able to just "run" ruby files?
I've had some experience using vertx on top of Java and it's quite simple with gradle or mvn to get it setup and running. 

The equivalent in Ruby would be a gem - but there is no gem for vertx...

Please advise,

Bernie 

Julien Viet

unread,
Aug 15, 2016, 10:44:52 AM8/15/16
to ve...@googlegroups.com
Hi Bernie,

what you are saing makes sense.

we had plans to make a gem for Ruby but never had really the time to do it.

perhaps we can try to set this up together with you and then take the appropriate steps to make this official ?

Julien

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/09badb51-0b33-4274-9b76-23f69899377b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bern

unread,
Aug 16, 2016, 3:06:41 AM8/16/16
to vert.x
Hi Julien,

That would be great!

How would you like to proceed? 

Thanks,

Bernie

Julien Viet

unread,
Aug 16, 2016, 6:01:46 AM8/16/16
to ve...@googlegroups.com
I think we could focus first on getting a small project (github repo) that works with jruby CLI

then see how it goes in IDE

Message has been deleted

Julien Viet

unread,
Aug 19, 2016, 5:57:46 AM8/19/16
to ve...@googlegroups.com
sure, I will try to spend some time on it soon.

On Aug 16, 2016, at 1:48 PM, bern <bernie....@nurego.com> wrote:

Cool - you want to send me a repo and I'll fork it?

Julien Viet

unread,
Aug 21, 2016, 1:30:24 PM8/21/16
to ve...@googlegroups.com
Hi,

I have created this repo with instructions : https://github.com/vietj/vertx-core-gem

I believe it should work for you (I hope).


let me know if it works for you.

Julien

On Aug 16, 2016, at 1:48 PM, bern <bernie....@nurego.com> wrote:

Cool - you want to send me a repo and I'll fork it?

Charles Monteiro

unread,
Jan 6, 2019, 6:49:12 AM1/6/19
to vert.x
So at what state is this in ? 

working with Jruby / Vertx via Gradle seems do-able but complicated.

I use Gradle to download the dependencies but the only thing that seem to work within the Jruby project I had setup in IDEA was to actually copy the Vertx ruby source and put in my src folder , then with some minor alterations to the Ruby example provided at the vert site I was able to do this:

$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))

require 'java'
require 'vertx/vertx'

$vertx = Vertx::Vertx::vertx

$vertx.create_http_server.request_handler { |req|
req.response
.put_header("content-type", "text/plain")
.end("Hello from Vert.x!")
}.listen(8080)

and to be clear this script above is directly under ./src
and the Ruby vertx source is directly under .src e.g. ./src/vertx, ../src/vertx-amqp-bridge , etc

of course I could segregate vertx source from my source

am I doing anything fundamentally against the grain , any suggestions as to a better setup in the context of IDEA ?

much appreciated

-Charles

Julien Viet

unread,
Jan 6, 2019, 5:08:39 PM1/6/19
to ve...@googlegroups.com
Hi,

are you building a fatjar to run your application ?

Julien

Charles Monteiro

unread,
Mar 5, 2019, 7:46:39 PM3/5/19
to vert.x
hi Julien, so sorry I have taken so long to check back on this but work just put me off on a tangent and as a matter of fact, due to my issues with setting up a viable project using IDEA / Gradle I started looking at Kotlin .
However, I would rather continue on with JRuby but unlike Kotlin where variables such as "vertx" and "config" are globally exposed , I don't find that to be the case with JRuby.

Yes, we always build fatjar deployments for Jruby and for that matter Groovy. In the Jruby case we are packaging with Warbler. Frankly , I don't yet have a good grip of how to use Jruby and Gradle in the context of IDEA so perhaps some if not most of my issues could be related to that i.e. the mixing of gems / jars and IDEA not being fully aware of the use case has been a headache.

Anyhow any feedback is appreciated. With Kotlin the examples all translate perfectly but again rather use JRuby for this project.

thanks
Reply all
Reply to author
Forward
0 new messages