Rally Software

 View Only

Extracting Attachments Script

  • 1.  Extracting Attachments Script

    Posted Nov 05, 2024 08:57 AM

    Hi all,

    I am trying to get this ruby script to run and cannot get past an error.  Please let me know if you have any feedback on how to resolve the error.

    Script: GitHub - RallyTools/Rally-Export-Attachments: Ruby script to export all attachments from a specified Rally Workspace for archival purposes

    Ruby335-1

    Error:

    Attempting connection to Rally as username: me@me.com at URL: https://rally1.rallydev.com/slm...
    C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/rally_api-0.9.20/lib/rally_api/rally_json_connection.rb:142:in `rescue in send_request': RallyAPI: - rescued exception - undefined method `timeout' for an instance of HTTPClient::Session on request to https://rally1.rallydev.com/slm/webservice/v2.0/security/authorize.js with params {} (StandardError)
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/rally_api-0.9.20/lib/rally_api/rally_json_connection.rb:136:in `send_request'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/rally_api-0.9.20/lib/rally_api/rally_json_connection.rb:58:in `setup_security_token'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/rally_api-0.9.20/lib/rally_api/rally_rest_json.rb:78:in `initialize'
            from export-workspace-attachments.rb:110:in `new'
            from export-workspace-attachments.rb:110:in `connect_to_rally'
            from export-workspace-attachments.rb:233:in `<main>'
    C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:751:in `connect': undefined method `timeout' for an instance of HTTPClient::Session (NoMethodError)
     
            timeout(@connect_timeout, ConnectTimeoutError) do
            ^^^^^^^
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:609:in `query'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:164:in `query'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:1083:in `do_get_block'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:887:in `block in do_request'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:981:in `protect_keep_alive_disconnected'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:886:in `do_request'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:774:in `request'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/rally_api-0.9.20/lib/rally_api/rally_json_connection.rb:138:in `send_request'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/rally_api-0.9.20/lib/rally_api/rally_json_connection.rb:58:in `setup_security_token'
            from C:/MyApps/Ruby33-x64/lib/ruby/gems/3.3.0/gems/rally_api-0.9.20/lib/rally_api/rally_rest_json.rb:78:in `initialize'
            from export-workspace-attachments.rb:110:in `new'
            from export-workspace-attachments.rb:110:in `connect_to_rally'
            from export-workspace-attachments.rb:233:in `<main>'