This forum is no longer active. Please post your questions to our new community site
OS X trying to install gem failing with sqlite3.h is missing
|
|
HI, I’m trying to install timetrap with ‘sudo gem install timetrap’ and OS X complained about having too low of a ruby version (1.8.6) so I thought BitNami RubyStack would help. I then tried this: But still get this: /Applications/rubystack-2.1-0/ruby/bin/ruby extconf.rb —with-sqlite-dir=/Applications/rubystack-2.1.0/sqlite -E
Provided configuration options: Gem files will remain installed in /Applications/rubystack-2.1-0/ruby/lib/ruby/gems/1.8/gems/sqlite3-1.3.3 for inspection. I don’t get it. Is RubyStack missing something? I actually have two instances of sqlite3.h, one in /usr/local from a previous attempt to install 1.8.7 via “One Click Ruby Installer” and no fidgeting with trying to pass sqlite include directory options worked. I clearly see sqlite3.h… but it’s not being found or there is some other issue. Should I be able to install a gem with RubyStack installed using the rubyconsole or do I need XCode developer tools and all of gcc as well? |
|
|
Hi, Could you try the following?
|
|
|
Thanks — is it as simple as needing the Developer Tools installed? I just did that and it now works. Or should what I needed have been present with the BitNami stack and I just wasn’t indicating —options right? If it should have worked with BitNami alone, I’ll uninstall the OS X Developer Tools and continue debugging. I’d prefer not to have them since they take quite a bit of space! |
|
|
Just ditched xcode and tried your code and got the same as above, minus the section about available options. Let me know if there’s a particular file you want the contents of. Thanks again. I found out that I can just install the gcc component of xcode, so I’m going to try that. There were some threads on stackexchange that seemed to indicate that gcc was necessary to build some gems. Maybe it’s as simple as that. |
|
|
Hi, The Xcode tools are necessary for some gems, for which of them which requires compilation. The sqlite3 gem requires to be compiled so it is necessary compilation tools: gcc, make,.. |
|
|
Yes — I see that it works with Xcode, but I guess I was trying to figure out which specific packages are required. Xcode now allows custom installation of only select packages. For example, there is a pkgs folder with gcc-4.2.pkg in it, but installing that did not help, even though sqlite.h exists. I’m trying to identify what, exactly, ruby is looking for to build gems. If you go the “standard route,” Xcode will install “Xcode Developer Essentials” which is a tooon of crap (2 GB) that I don’t need — bluetooth SDKs, Xcode IDE, etc. I’ll never touch that stuff and thus just finding the package with the c headers or whatever else would be fantastic! I do appreciate your persistence and suggestions! |
|
|
Hi, The SQLite headers and libraries are in the “your_installdir/sqlite” folder so if you specify the location of this folder during the gem installation should work. |
|
|
Isn’t that what we tried with this: “$ gem install sqlite3 — —with-sqlite3-dir=/Applications/rubystack-2.1-0/sqlite —debug”? That didn’t do anything different for me. I’m thinking you’re saying I need gcc + sqlite libraries/headers. So are you saying that as long as I could issue “which gcc” and have a proper answer, and have the BitNami RubyStack… I should be okay? |
|
|
Hi, Yes you need the gcc, make,.. the basic compilation tools. The sqlite libraries and headers are shipped in RubyStack. We will try to include this gem in the next release to avoid compilation issues. Thanks for reporting it. |

