I am trying to connect to a snowflake database to a rails app. I followed the necessary instructions found at https://docs.snowflake.com/en/user-guide/odbc.html. After installing unixodbc and configuring the drivers. I try to run the server from my rails application. But I always get the following error:
Sequel::DatabaseConnectionError: ODBC::Error: 01000 (0) [unixODBC][Driver Manager]Can't open lib '/opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib' : file not found
The "libSnowflake.dylib" appears to be present at the right location, I even checked the same in odbc.ini file.
The problem only appears to be happening in my Macbook M1 model, others seems to be just fine, I can vouch on this as I got the same error on my colleagues M1 device as well, while it installs perfectly on Intel enabled Macbook. Can someone please guide me what can be done in this case as I don't see much help on this specific topic.
The only difference I can make out is the location of my driver files. running "odbcinst -j" on my system gives following:
unixODBC 2.3.9
DRIVERS............: /opt/homebrew/etc/odbcinst.ini
SYSTEM DATA SOURCES: /opt/homebrew/etc/odbc.ini
FILE DATA SOURCES..: /opt/homebrew/etc/ODBCDataSources
USER DATA SOURCES..: /Users/raktim.bhowmick/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8.`
On my colleagues macbook the following shows up. unixODBC 2.3.9
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /Users/prashant.devani/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8.
Also I want to mention that I have a seperate profile on my macbook which has system priveledges.