Has anyone compiled this gem with SEE (SQLite Encryption Extension)? #389
-
Hi, I'm developing a local (non-internet) rails app and I'd like to use the SEE with SQLite. It looks like a pretty attractive solution to me for a number of reasons. I'd like to hear if anybody has done this successfully or otherwise. It looks like just a matter of dropping in the SEE .c code to the ext/libsqlite directory and compiling. I'm not sure that's enough though as I have never used this software and as a small-time solo operator I don't want to shell out a couple Gs just to end up in a quagmire. Thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 6 replies
-
@slithernix I wrote up some instructions for loading extensions at #383 which I think should probably be helpful for you. If it is, I'd love to hear feedback on it so that I can add it to the README. |
Beta Was this translation helpful? Give feedback.
-
similar thing on Linux: [6] pry(main)> db.load_extension("/home/jguy/working/see-sources/libsee.so") |
Beta Was this translation helpful? Give feedback.
-
this extension is designed to a drop in replacement for sqlite.c. wouldn't it be better if i just replace sqlite.c in the gem's source in /ext? the thing is, when i tried that earlier, it still downloaded the sqlite distro from sqlite.org when I ran the gem build. did i miss something to force it to look at the local ext? |
Beta Was this translation helpful? Give feedback.
-
i also tried with PRAGMA textkey, just in case, same behavior |
Beta Was this translation helpful? Give feedback.
-
Ok, so I actually did miss a line in the wiki (the PRAGMA to activate the extension), so I tried again to no avail:
I suspect that I just don't have the right file(s)/file structure in /opt/see. |
Beta Was this translation helpful? Give feedback.
-
OK thanks!!! you gave me a hint by mentioning the autoconf layout... I was going about this all wrong. I got this working by downloading the autoconf package, rsyncing the see-sources over to it (and copying the appropriate encryption type file over sqlite3.c), then doing a ./configure && make && make install. so actually way easier than what I was trying to do earlier. now all I have to do is look at how to execute custom PRAGMAs at the beginning of a rails start and I will be in business. thank you so much!!!! |
Beta Was this translation helpful? Give feedback.
-
Note: I've extracted some of what we talked about here into INSTALLATION.md in #390 |
Beta Was this translation helpful? Give feedback.
My advice above assumed the structure of
/opt/see
was similar to the directories that the autoconf package installs with./configure --prefix=/opt/see ; make install
:Now that I understand what's in your directory, here's an updated suggestion: