khurana.rupak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-26 19:10 UTC
Can RoR call java or C code
Hi I posted this a while back but it has not yet showed up. I dont know what happened last time.. so posting again 1. Can RoR call C or java third party code? 2. Does it support File I/O ? thanks Rupak --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You can write extensions to the Ruby language in C to call third-party code. RoR itself does not provide any such facilities. You could take a look at the JRuby project. This allows Ruby to run on top of the JVM and provides full access to the Java platform. It is not currently mature enough to support RoR unfortunately. :( -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
P.S. RoR does support file I/O - but only on the server of course. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
khurana.rupak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Hi > I posted this a while back but it has not yet showed up. I dont know > what happened last time.. so posting again > > 1. Can RoR call C or java third party code? > 2. Does it support File I/O ? > > thanks > Rupak > > > > > >This might help: http://www.rubyinside.com/writing-your-own-ruby-extension-with-c-366.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> 1. Can RoR call C or java third party code?Yes. Both. Those aren''t really features of RoR but of Ruby. There is a whole chapter in the Pickaxe book about extending Ruby with C. As for Java, try RJB the Ruby Java Bridge. In fact I just wrote a RoR project that uses itext, a java library, via RJB. It worked very well.> 2. Does it support File I/O ?Of course. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jan 27, 7:22 am, Mick Sharpe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> You can write extensions to the Ruby language in C to call third-party > code. RoR itself does not provide any such facilities. > > You could take a look at theJRubyproject. This allows Ruby to run on > top of the JVM and provides full access to the Java platform. It is not > currently mature enough to support RoR unfortunately. :(Actually JRuby does run RoR right now, but with caveats (known issues) and it''s better at 1.1.6. However we''ve been demoing basic Rails 1.2.1 apps running under JRuby almost weekly, and we''re making a major push over the next month to cleanup all the remaining failures. - Charlie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---