Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JRuby & Rails

 
Carl Sampson
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just checked the status of the JRuby project and it looks like it is coming along really well. Does Rails work in JRuby?
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Carl Sampson:
I just checked the status of the JRuby project and it looks like it is coming along really well. Does Rails work in JRuby?


Even if it did, what would be the point? JRuby is a means to use the features of Ruby in java. With Rails, there is no java, and there is no need for java. So JRuby would be pointless.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if I managed to parse Gregg's comment correctly, but...

I think JRuby's pretty close to running Rails but I haven't checked up on Charles Nutter's blog lately. He posts quite informative updates on the JRuby team's progress there.

I think I remember Charles mentioning that being able to run Rails is one of their requirements for saying, "1.0".
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:
I'm not sure if I managed to parse Gregg's comment correctly, but...


My point was, why would you want to do this? Why not just use Ruby and Rails? What benefits would JRuby give you with Rails over pure Ruby?
 
Martin Gross
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JRuby gives you the advantage that you can run Ruby (and later Rails) on the Java platform with all the available libraries. E.g. integrating it tightly with other already existing java software. And it removes the need to install ruby, lets say on a enterprise production environment, which might be restricted due to company policies.
 
G Horie
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

... JRuby is a means to use the features of Ruby in java.


Correct me if I'm wrong, but I think its the other way around. The way I read it, JRuby is a means to use the features of Java in Ruby.



- See JRuby Home for the details.

In support of Martin's statement, in my enterprise I typically don't have the luxury of re-coding legacy EJB services in another language like Ruby, but I still may want to use Ruby to improve my productivity. So using Ruby on Rails leveraging legacy EJB when necessary may be a decent solution. I haven't tried this yet, but I would like to sometime soon.
 
Eric Martinez
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"JRuby is a 100% Java implementation of the Ruby programming language. It is Ruby for the JVM.

JRuby provides a complete set of core "builtin" classes and syntax for the Ruby language, as well as most of the Ruby Standard Libraries. The standard libraries are mostly Ruby's own complement of .rb files, but a few that depend on C language-based extensions have been reimplemented. Some are still missing, but we hope to implement as many as is feasible." -JRuby Wiki
[ January 18, 2007: Message edited by: Eric Martinez ]
 
Prag Dave
author
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jruby is deeply significant if you work in a company with existing Java code. It lets you run new Ruby code alongside your existing Java code, sharing classes both ways. This means that you don't have to reimplement all those lbraries you spent the last 5 years writing.

At Euro RailsConf, I saw my Depot application running on JRuby in a JVM. It was using Java entity beans, via Active Record, to store data. That's a major, major win.


Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic