7 Replies Latest reply on May 6, 2014 12:23 AM by Alexey Mironov

    Init wrong number of arguments (2 of 1)

    Alexey Mironov

      Hello,

      I have come RhoConnect controller "users.rb" -

       

      require 'oci8'

       

      class Users < SourceAdapter

        def initialize(source)

          f = File.new(Dir.pwd + "/settings/config.txt")

          i = 0

          f.each do |line|

            if (i.to_i == 0)       

              @conn = line.chop

            end

            i = i.to_i + 1

          end

          f.close

        

          @client = OCI8.new(@conn)

        

          super(source)

        end

       

      ..........................

       

      Sync was work good by win test platform. But when I run it in CentOs virt masjine I catch this:

       

      Writing PID to /var/run/thin/thin.1.pid

      Changing process privilege to nginx:nginx

      Using rack adapter

      [08:29:18 AM 2014-04-16] Rhoconnect Server v3.3.2 started...

      Warning: NLS_LANG is not set. fallback to US7ASCII.

      Thin web server (v1.6.2 codename Doc Brown)

      Maximum connections set to 1024

      Listening on /tmp/thin.1.sock, CTRL+C to stop

      [08:55:34 AM 2014-04-16] Use of the GET /application/clientcreate is deprecated. Use Rhoconnect API v1 instead.

      [08:55:37 AM 2014-04-16] Use of the GET /application is deprecated. Use Rhoconnect API v1 instead.

      [08:55:37 AM 2014-04-16] wrong number of arguments (2 for 1)/opt/nginx/html/collection_connect/sources/users.rb:5:in `initialize'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/source_adapter.rb:44:in `new'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/source_adapter.rb:44:in `rescue in create'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/source_adapter.rb:25:in `create'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/source_sync.rb:9:in `initialize'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/client_sync.rb:16:in `new'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/client_sync.rb:16:in `initialize'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/server.rb:171:in `new'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/server.rb:171:in `current_client_sync'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/api/app/query.rb:3:in `block in <top (required)>'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/async.rb:55:in `block (2 levels) in execute_api_call'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/async.rb:41:in `block in catch_all'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/async.rb:41:in `catch'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/async.rb:41:in `catch_all'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/rhoconnect-3.3.2/lib/rhoconnect/async.rb:54:in `block in execute_api_call'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:in `call'

      /opt/rhoconnect/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:in `block in spawn_threadpool'

      [08:59:28 AM 2014-04-16] Use of the POST /application/clientregister is deprecated. Use Rhoconnect API v1 instead.

      [08:59:29 AM 2014-04-16] Use of the GET /application is deprecated. Use Rhoconnect API v1 instead.

       

       

      What the problem? Before thet this virtual mashine (CentOs) used me for another rhoconnect app and so work good (befre this I reconfig thin and nginx).