Thank you for the fast response. 

1. You are right. OS X 10.9 Mavericks and 10.10 Yosemite come with 
libsqlite3.dylib built in as SQLite3 is used in Safari and a number of other 
places. This is the reason Pharo and NBSQLite3 never complained about a missing 
library to start with. 

2. The default location for the myfile.db still eludes me somehow. You are 
again right about 
NBSQLite3Connection on: '/Volumes/MacHDD/Users/Shared/myfile.db'.
actually creating the file if none is found, however just using 
NBSQLite3Connection on: 'myfile.db'.
without a path leaves me dumbfounded as to where this file is created, 
searching for produces no results. Maybe it's created inside the image itself 
somewhere?

Pe 19 ian. 2015, la 11:12, Guillermo Polito <guillermopol...@gmail.com> a scris:

> Hi Mircea,
> 
> - About the library:
> You can either install the sqlite library close to the VM or, as mac is a 
> unix, in /usr/lib. I have for example mine in here:
> 
> /usr/lib/libsqlite3.dylib
> 
> The VM loads the libraries dinamically, so putting the library in one of 
> those locations should IIRC by default look at those places.
> 
> - about the db file:
> 
> do you already have a db file you want to open?
> Usually the db file is next to the image again IIRC ^^.
> 
> What you can actually try is opening an unexistent database, what will create 
> a new file for you. That will give you an idea of where the database file 
> should be placed.
> 
> Hope that helps,
> Guille
> 
> 
> El Mon Jan 19 2015 at 9:54:56 AM, Mircea S. <mir...@unom.ro> escribió:
>> Forgot to mention I want to use a relative path if at all possible. 
>> 
>> 
>> 
>> Pe 19 ian. 2015, la 00:46, Mircea S. <mir...@unom.ro> a scris:
>> 
>>> Hello everyone,
>>> 
>>> I was looking into NBSQLite3 using the guide on smalltalkhub, pasted it 
>>> below.
>>> 
>>> 1. NBSQLite3 seems to be missing from "Tools" -> "Configuration Browser" so 
>>> I had to use the Gopher script. 
>>> 
>>> 2. I can't seem to get the around to installing the sqlite engine on my 
>>> mac. What is the default folder there? Do I need this?
>>> 
>>> 2a. On the same page with the one above. What is the location where the 
>>> db.sqlite file must be copied to? On the mac I can put it in the same 
>>> folder (no go) or "show package contents" on Pharo itself to see the 
>>> folders inside the package, tried Contents/Resources there but no dice. 
>>> 
>>> No matter what I try I get a NBSQLite3Error: unable to open database file 
>>> form one of the reasons above. 
>>> 
>>> Thank you,
>>> Mir S.
>>> 
>>> Installation
>>> 
>>> You can access NBSQLite3 from the Pharo configuration browser. Just select 
>>> "Tools" -> "Configuration Browser" from the world menu, enter "NBSQLite3" 
>>> and install the stable version. 
>>> 
>>> Alternatively to install the packages manually into your Pharo image just 
>>> evaluate:
>>> 
>>> Gofer new url: 'http://smalltalkhub.com/mc/PharoExtras/NBSQLite3/main'; 
>>> package: 'ConfigurationOfNBSQLite3'; load. ((Smalltalk at: 
>>> #ConfigurationOfNBSQLite3) project stableVersion) load.
>>> If you need access to the SQLite3 database engine you need at a minimum the 
>>> "NBSQLite3-Core" package which is loaded by the ConfigurationOfNBSQLite3 
>>> class. 
>>> 
>>> This package includes all necessary API to access the sqlite engine. 
>>> 
>>> Use in your own application
>>> 
>>> Providing the library files
>>> 
>>> To use the sqlite3 database engine in own Pharo projects you need to 
>>> install the "sqlite3" database engine first. Basically it is only a shared 
>>> library component that has to be found by the Pharo virtual machine.
>>> 
>>> For instance on Windows operating system you can download the "sqlite3.dll" 
>>> component from http://www.sqlite.org/ and copy it into the same directory 
>>> where the Pharo VM (Pharo.exe) is. 
>>> 
>>> After loading NBSQLite3 as described before you can run the unit tests to 
>>> see if anything is correctly setup and the virtual machine is able to find 
>>> the sqlite3 engine.
>>> 
>>> Use in your code
>>> 
>>> Creating a connection
>>> 
>>> The most important class to use for creating a database is the class 
>>> NBSQLite3Connection. For instance the following expression:
>>> 
>>> NBSQLite3Connection on: 'myfile.db'.

Reply via email to