[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rsruby with rails

Matteo Zandi

10/19/2007 5:26:00 PM

Hi,

I'd like to call R from a rails application. I already installed rsruby
and works fine with irb, but how do I call it from rails?

I have created config/evironments/rsruby_environment.rb like so:

require 'rsruby'
module R_Config

R = RSRuby.instance

end

then added it to config/environments.rb:

...
# Include your application configuration below

# rsruby-Configuration
require 'environments/rsruby_environment.rb'
require 'rsruby'

inserted in a controller like so:

r = R_Config::R
@r_pnorm = r.pnorm(0.1)

and finally called in a view

<%= @r_pnorm %>

Is that correct? What is wrong?

Thanks,
Matteo
--
Posted via http://www.ruby-....