JRuby on Rails Facet?

I've wanted to try deploying a rails app via tomcat and so I installed the latest JRuby, updated the gems for it, and updated my Ruby plugin for Intellij 8.0.1. Then I created a new Ruby project, selecting Ruby on Rails then had it generate the basic rails app. When I looked at the Project Structure's Facets I see one for JRuby on Rails with nothing under it, but the plain Ruby on Rails had my new project under it. I tried again but this time I removed my old Ruby SDK so that the only Ruby SDK was JRuby. Same thing. Has anyone else seen this?

Actually, has anyone seen any docs on using Intellij to deploy a rails app to tomcat? I assume it can be done, but I haven't had any luck getting past this first stage.

My grand plan is to be able to code and deploy a complex app that contains servlets, flash and rails with Intellij. I would be very sad if I couldn't do this. :-)

--fran

3 comments
Comment actions Permalink

Hi Fran,

I've wanted to try deploying a rails app via tomcat and so I installed the latest JRuby, updated the gems for it, and updated my Ruby plugin for Intellij 8.0.1. Then I created a new Ruby project, selecting Ruby on Rails then had it generate the basic rails app. When I looked at the Project Structure's Facets I see one for JRuby on Rails with nothing under it, but the plain Ruby on Rails had my new project under it. I tried again but this time I removed my old Ruby SDK so that the only Ruby SDK was JRuby. Same thing. Has anyone else seen this?

For JRuby (and JRuby on Rails) support you should create Java module, not Ruby. Because Ruby module is for pure Ruby (including Ruby on Rails) applications.
So you should
1. File | New Project
2. Select "Create project from scratch", press 'Next'
3. Choose "Java Module", press 'Next'
4. Use default src directory, press 'Next'
5. At "Please select desired technologies" select 'JRuby' and 'JRuby On Rails' check boxes
6. Press "Finish"

0
Comment actions Permalink

Thank you, Roman, that worked. Well, I did have to add one step, which was to go to the project tab and select the java SDK. At that point I could hit the default run and see the Rails "Welcome aboard" page.

I can see now how to mingle different languages in a single project. But I'm not sure if Intellij has anything built in that will jar up the jruby code and everything for me or not or if I'll have to write some ant to do that. I missed that in the docs, is it there or did I overlook it?

--fran

0
Comment actions Permalink

Hello Fran,

I can see now how to mingle different languages in a single project.
But I'm not sure if Intellij has anything built in that will jar up
the jruby code and everything for me or not or if I'll have to write
some ant to do that. I missed that in the docs, is it there or did I
overlook it?


We don't yet have any built-in support for packaging JRuby on Rails applications.
Most likely it will be added in a future update.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.