Inserting records using REST

HI All,

I have a situation to insert records from table of one database to a
table of another database. Previously I did it using the following code
in the script.

establish_connection File.open( "#{RAILS_ROOT}/config/database.yml" )

and change the settings of database.yml to connect to the database
present in a <b>remote server</b>.

But the problem here is, now a firewall is been setup in the remote
server and am not able to connect to the remote database using
database.yml.

Please suggest me an alternative to do this.

thanks,
Raju

What are the alternatives? I mean we know the port for the database
was closed, but is there a live application on that server that access
that database? can you install a new application there? can you run a
rake task there?

Thanks for your reply Leonardo,

There is a live application in that server. I am using Web services with
REST, Still in the process,

I am using RestClient.get for requesting xml and Hash.from_xml to parse
the xml string.

Thanks,
Raju

I would use that application to create the new records. If you can
modify the application that will receive the data, you can add some
service to receive a batch of records so you don't have to add them
one by one wich will be noticeably slower.