Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

I'm working on a web project, which connects to a SQLAnywhere version 17 database. I'm using Ruby version 2.6.2 and Rails 6.0.6 to run the app.

I've already set the SQLAnywhere environment variables, hosted in the following script:

. /opt/sqlanywhere17/bin64/sa_config.sh

In the development environment it works without apparent problems, but in the production environment it throws me the following error:

LoadError (Could not load SQLAnywhere
DBCAPI library):

I've already tried setting the various bash script manually, but it still didn't work. What else could I try?

The gems that depend on these libraries are the following:

gem 'sequel'
gem 'sqlanywhere'

asked 27 Jan '23, 07:32

mandres's gravatar image

mandres
71125
accept rate: 50%

edited 27 Jan '23, 07:33

1

Have you verified the environment inside of RUBY? For example, the value returned by ENV["LD_LIBRARY_PATH"] should include the $SQLANY17/lib64:$SQLANY17/lib32 (or the location of the libdbcapi* libraries). ENV.inspect will output the full environment visible in Ruby.

(28 Jan '23, 16:07) Chris Keating

Thanks a lot!. I have solved this problem, loading the definition of the variables in the configuration file in two locations:

/usr/local/rvm/wrappers/default/ruby
/etc/rvmrc
permanent link

answered 02 Feb '23, 05:57

mandres's gravatar image

mandres
71125
accept rate: 50%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×14
×11

question asked: 27 Jan '23, 07:32

question was seen: 371 times

last updated: 02 Feb '23, 05:57