https://github.com/rhuanbarreto/ip21-ruby
IP21 Database connection for Ruby. With this gem you will be able to connect to IP21 and execute queries against the database using SQL statements.
https://github.com/rhuanbarreto/ip21-ruby
aspentech ip21 rails ruby sinatra sqlplus
Last synced: about 2 months ago
JSON representation
IP21 Database connection for Ruby. With this gem you will be able to connect to IP21 and execute queries against the database using SQL statements.
- Host: GitHub
- URL: https://github.com/rhuanbarreto/ip21-ruby
- Owner: rhuanbarreto
- License: mit
- Created: 2019-03-28T09:49:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-18T20:49:33.000Z (over 3 years ago)
- Last Synced: 2025-10-11T06:19:30.257Z (8 months ago)
- Topics: aspentech, ip21, rails, ruby, sinatra, sqlplus
- Language: Ruby
- Homepage: https://www.rubydoc.info/github/rhuanbarreto/ip21-ruby/master
- Size: 34.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Aspentech IP21 Ruby Gem
[](https://badge.fury.io/rb/ip21)
With this gem you will be able to connect to IP21 and execute queries against the database using SQL statements or fetching from history or KPI table definitions.
Full documentation on https://rubydoc.info/gems/ip21
## Installing
To install this gem, use the following command:
```sh
$ gem install ip21
```
Or add to your Gemfile:
```ruby
# Gemfile
gem 'ip21'
```
And use the class in your code to execute queries:
```ruby
require 'ip21' # If you are using Ruby. Don't need require if you use Rails
IP21.new(
auth: {
account: 'john.doe',
domain: 'contoso.com',
password: 'set_your_own_password'
},
sqlplus_address: '127.0.0.1',
ip21_address: '127.0.0.1',
).query('SELECT IP_PLANT_AREA, Name, IP_DESCRIPTION FROM IP_AnalogDef')
```
## Prerequisites
- IP21 Database
- SQLPlus with REST installed
## Authentication
This gem uses Windows authentication (NTLM) to connect to SQLPlus, so don't forget to set your credentials correctly.
On domain you can use the NETBIOS name (CONTOSO) or the normal domain name (contoso.com)
# Changelog
See the [commit page](https://github.com/rhuanbarreto/ip21-ruby/commits) for a list of changes.
# License
IP21 Gem by Rhuan Barreto. IP21 Gem is licensed under the MIT license. Please see the LICENSE file for more information.