I'm new to OS X. I've been messing with Rails for about a year. I've cloned my rails app using git. script/server starts, and I get an error in my browser about sqlite3. So, I try to install sqlite-ruby gem and I fail as follows: [lostsync@alice ~/projects/motleylane-deploy]$ sudo gem install sqlite-ruby Password: Building native extensions. This could take a while... ERROR: Error installing sqlite-ruby: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb install sqlite-ruby checking for main() in -lsqlite... no checking for sqlite.h... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: /* snipped */ Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/sqlite-ruby-2.2.3 for inspection. Results logged to /usr/local/lib/ruby/gems/1.8/gems/sqlite-ruby-2.2.3/ext/gem_make.out [lostsync@alice ~/projects/motleylane-deploy]$ which sqlite3 /usr/bin/sqlite3 I cannot figure this out and Google is not turning up much help. Thanks.
on 2009-01-24 20:12
on 2009-01-24 20:14
On 24 Jan 2009, at 18:12, Adam M. wrote: > > I'm new to OS X. I've been messing with Rails for about a year. > > I've cloned my rails app using git. script/server starts, and I get > an > error in my browser about sqlite3. > > So, I try to install sqlite-ruby gem and I fail as follows: > Are the dev tools installed ? Fred
on 2009-01-24 20:36
Frederick C. wrote: > Are the dev tools installed ? > > Fred Yes. I reinstalled them just to be sure. The error persists.
on 2009-01-24 21:46
Ah, I know what's up. Try installing sqlite3-ruby instead (you were trying to install the gem for sqlite 2) Sent from my iPhone On 24 Jan 2009, at 18:36, Adam M. <rails-mailing-list@andreas-
on 2009-01-24 22:06
Just a guess here but... I notice that your install target directory is /usr/local/... while "which sqlite3" points at /usr/bin. I'm suspecting that the path to the library is not set right in your environment - you need to be able to find the sqlite includes and libraries during the install. Not sure what's the simplest way to do this but here's what works for me. I use /opt/local/... for my personal install root as OSX upgrades overwrite the /usr/local directory. I built (ppc pre-built not available) and installed my own copy of sqlite3 in /opt/local/bin and have /opt/local/bin at the front of my search path. I'm running OSX 10.5.6, here are my RoR specs: Ruby version 1.8.7 (powerpc-darwin9) RubyGems version 1.3.1 Rails version 2.2.2 Active Record version 2.2.2 Action Pack version 2.2.2 Active Resource version 2.2.2 Action Mailer version 2.2.2 Active Support version 2.2.2 Application root /Users/rick/sqlite-test Environment development Database adapter sqlite3 Hope this helps... Rick On Jan 24, 8:12 am, Adam M. <firstname.lastname@example.org>
on 2009-01-24 22:53
Frederick C. wrote: > Ah, I know what's up. Try installing sqlite3-ruby instead (you were > trying to install the gem for sqlite 2) > > Sent from my iPhone > > On 24 Jan 2009, at 18:36, Adam M. <rails-mailing-list@andreas- Well, that's mildly embarrassing. ;) Thank you. Works now.