8 Copyright (C) The Arvados Authors. All rights reserved.
10 SPDX-License-Identifier: CC-BY-SA-3.0
13 The Ruby SDK provides a generic set of wrappers so you can make API calls easily.
17 If you are logged in to an Arvados VM, the Ruby SDK should be installed.
19 To use it elsewhere, you can either install the @arvados@ gem via RubyGems or build and install the package using the arvados source tree.
23 # "Install Ruby":../../install/ruby.html
25 The SDK uses @curl@ which depends on the @libcurl@ C library. To build the module you may have to install additional packages. On supported versions of Debian and Ubuntu, run:
29 # <span class="userinput">apt install build-essential libcurl4-openssl-dev
33 h3. Install with RubyGems
37 # <code class="userinput">gem install arvados</code>
43 If the SDK is installed, @ruby -r arvados -e 'puts "OK!"'@ should produce no errors.
45 If your @ARVADOS_API_HOST@ and @ARVADOS_API_TOKEN@ environment variables are set up correctly (see "api-tokens":{{site.baseurl}}/user/reference/api-tokens.html for details), the following test script should work:
48 <pre>$ <code class="userinput">ruby -r arvados <<'EOF'
49 arv = Arvados.new api_version: 'v1'
50 my_full_name = arv.user.current[:full_name]
51 puts "arvados.v1.users.current.full_name = '#{my_full_name}'"
53 arvados.v1.users.current.full_name = 'Your Name'