Troubles with bindings lib in RoR

Hi to all
I have a simple library (extension) for ruby…
Here is an tes script for this library test.rb

if ARGV.include?(“local”)
require “…/…/bin/libagisRubySrv”
require “/usr/lib/libagisRubySrv”

a =
puts “a: #{a}”

someStr = “1234567890”
sz = someStr.length;
puts “strlength: #{sz}”
result = a.resolveCmd(someStr)
puts “result: #{result}”

It is working perfectly.

Its out:

a: #AGIS::RubyBinder:0xb7d185f0
strlength: 10
result: received data size: 10

But when I try to make the same in RoR controller…

$:.push ‘lib’
require ‘/home/valden/_AGIS/bin/librubySrv’
require ‘logger’

class SourceController < ApplicationController
before_filter :authenticate

def getBoundingBox
    logger ='log/main.3000.log')
    logger.debug '====='
    binder =
    logger.debug "bnd: #{binder}"
    testStr = "1234567890"
    result = binder.resolveCmd(testStr)
    logger.debug "result: #{result}"


in out file I get

bnd: #AGIS::RubyBinder:0xb71eb6dc
result: #AGIS::RubyBinder:0xb71eb6dc


Regards Denis V. Valchuk

P.S. In attachment sources of the library…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs