run an sql query

Hello All,

Iam new to Ruby on Rails. I am moving my application to Ruby on rails.
Is there an way i can call C++ API from ruby, so that i dont have to do
much porting on Ruby on Rails.

I have alread an DB and i want to just show only selected columns from
one of the table. I am not getting how to write an sql query. Can any
one help me in this regard.

Regards,
Amit JAin

hi amit ..
There is no any bridge available for c++ and ruby till..
1 way is there you can convert your app to ror complete...
pls refer this in case of any help
http://saurabh.purnaye.googlepages.com
Regards
Saurabh purnaye
saurabh[dot]purnaye[at]gmail[dot]com

Amit Jain wrote:

Saurabh Purnaye wrote:

hi amit ..
There is no any bridge available for c++ and ruby till..
1 way is there you can convert your app to ror complete...
pls refer this in case of any help
http://saurabh.purnaye.googlepages.com
Regards
Saurabh purnaye
saurabh[dot]purnaye[at]gmail[dot]com

Amit Jain wrote:

Hello All,

Iam new to Ruby on Rails. I am moving my application to Ruby on rails.
Is there an way i can call C++ API from ruby, so that i dont have to do
much porting on Ruby on Rails.

I have alread an DB and i want to just show only selected columns from
one of the table. I am not getting how to write an sql query. Can any
one help me in this regard.

Regards,
Amit JAin

Hello Saurabh,

Thanks for replying me back.
1 way is there you can convert your app to ror complete. How can i
achieve this?
I have added you on skype. i went thru site, but could not find. Can u
send me the exact link.

Regards,
Amit Jain

hi amit ..
There is no any bridge available for c++ and ruby till..

Um you can quite easily write a ruby extension in c++. It's really
just the same as writing one in C (although there are some gotchas
around exception handling, ruby exceptions not unwinding the c++ stack
properly and things like that). We use several such extensions.

Fred

Frederick Cheung wrote:

Frederick Cheung wrote:

hi amit ..
There is no any bridge available for c++ and ruby till..

Um you can quite easily write a ruby extension in c++. It's really
just the same as writing one in C (although there are some gotchas
around exception handling, ruby exceptions not unwinding the c++
stack
properly and things like that). We use several such extensions.

Fred

Can you prvoide me some link or document where i can understand this
extensions?

Well there's stuff in the pickaxe, and a quick search for 'ruby c
extension' brings up stuff like http://www.rubyinside.com/how-to-create-a-ruby-extension-in-c-in-under-5-minutes-100.html

Carlson & Richardson's "Ruby Cookbook" (O'Rielly) might be a good
reference. They present a few different ways to ref a C-based API.