Learn the basic steps to set up the Square SDK for a Ruby project.
If you're new to developing Square integrations using the Square Ruby SDK, try the Quickstart. It provides step-by-step instructions to explore your first project.
The Square Ruby SDK is packaged as a Ruby gem. You can install it manually using the gem
utility or dynamically using the Bundler dependency manager.
You can quickly install the Square Ruby SDK, and all of its dependencies, as follows:
gem install square.rb
To determine where the gem was installed, use the following:
gem which square.rb
To view the gem's dependencies, use the following:
gem dependency square.rb
If you're using Bundler for dependency management, you can create or modify a Gemfile
that references the Square Ruby SDK. You can use the following simple Gemfile
as is or customize it to fit your needs:
source 'https://rubygems.org'
gem 'square.rb'
To install the SDK, use the bundle
command:
bundle install