Skip to content

Install

Meta Head edited this page Sep 9, 2022 · 1 revision

Install and configure NEAR ruby API library

Ruby API library installs as usual Ruby gem. Add to your Gemfile:

gem 'near_api'

bundle install

That it. Check out Ruby NEAR API

Install and configure NEAR js library (optional step)

This might be helpful to let user login via NEAR wallet or ask user to sign transaction.

The simplest way to install near-api-js is to add precompiled js file to rails project.

Download latest version of near-api-js from https://github.com/near/near-api-js/releases Compile as:

yarn
yarn build

Copy ./packages/near-api-js/dist/near-api-js.js or near-api-js.min.js to rails project and make sure it is loaded. For ex as here

Clone this wiki locally