# Troubles with bindings lib in RoR

**URL:** <https://www.ruby-forum.com/t/troubles-with-bindings-lib-in-ror/113376>\
**Category:** Rails\
**Created:** [August 30, 2007, 2:24pm UTC](https://www.ruby-forum.com/t/troubles-with-bindings-lib-in-ror/113376 "2007-08-30T14:24:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![denao](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8c91f0/32.png) [@denao](https://www.ruby-forum.com/u/denao)\
**Post date:** [August 30, 2007, 2:24pm UTC](https://www.ruby-forum.com/t/troubles-with-bindings-lib-in-ror/113376/1 "2007-08-30T14:24:51Z")

</div>

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”  
else  
require “/usr/lib/libagisRubySrv”  
end

a = AGIS::RubyBinder.new  
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 = Logger.new('log/main.3000.log')
    logger.debug '====='
    binder = AGIS::RubyBinder.new
    logger.debug "bnd: #{binder}"
    testStr = "1234567890"
    result = binder.resolveCmd(testStr)
    logger.debug "result: #{result}"
    render_ok
end

```

end

in out file I get

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

Why???  
:(((((

Regards Denis V. Valchuk

P.S. In attachment sources of the library…
