Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 512753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:21:08+00:00 2026-05-13T07:21:08+00:00

I got ruby 1.8.7 (native compiled), rails 2.3.4, OSX 10.6.2 and also sqlite3-ruby. The

  • 0

I got ruby 1.8.7 (native compiled), rails 2.3.4, OSX 10.6.2 and also sqlite3-ruby.

The error I’m getting when accessing the rails app is

NameError: uninitialized constant SQLite3::Driver::Native::Driver::API

History:
I upgraded to snow leopard by migrating my apps with a FW-cable from my old macbook to the new one. Everything was running perfectly for months, but Yesterday I needed to install watir, which was dependant on rb-appscript, which didn’t build due a “wrong architecture” error in libsqlite3.dylib. I figured the build was made on the old machine, so i wanted to rebuild sqlite3-ruby:

$ sudo gem uninstall sqlite3-ruby

$ sudo gem install sqlite3-ruby

Building native extensions. This could take a while…
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for fdatasync() in -lrt… no
checking for sqlite3.h… yes
checking for sqlite3_open() in -lsqlite3… 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.

It seems like the sqlite3 libs are not working properly. I’ve tried to install macports sqlite3 (sudo port install sqlite3) and use that instead, but with same result… so i rebuild sqlite3 from scratch.. download->configure->make->make install. After that, the gem now builds perfectly, but doesn’t work in rails, giving the error in the top of this article.

I’m not really sure where to go from here because I’ve tried the following

  1. Rebuild sqlite3 from newest source (http://www.sqlite.org/download.html)
  2. Reinstalled sqlite3-ruby (sudo gem uninstall sqlite3-ruby && sudo gem install sqlite3-ruby)
  3. Used sqlite3 from macports (sudo port install sqlite3 && sudo gem install sqlite3-ruby)
  4. Reinstalled rails (sudo gem install rails sqlite3-ruby ) and updated environment.rb to rails 2.3.5.

No avail, I still get this error:

NameError: uninitialized constant SQLite3::Driver::Native::Driver::AP
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in const_missing'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/driver/native/driver.rb:76:in
open’
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/database.rb:76:in `initialize’

Btw, I have Xcode installed from the Snow Leopard CD.

What can i do to solve the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:21:08+00:00Added an answer on May 13, 2026 at 7:21 am

    Thanks for the answers. Here is what i did to solve the problem:

    1. Complete reinstall of ruby1.8.7 to /usr/local, see here: http://hivelogic.com/articles/ruby-rails-leopard

      Note: readline wasn’t working when recompiling ruby on my mac, so i had to build that too from scratch and make sure to add the –with-readline-dir option to configure:

      ./configure –enable-shared –enable-pthread CFLAGS=-D_XOPEN_SOURCE=1 –prefix=/usr/local –with-readline-dir=/usr/local

    2. Complete reinstall of sqlite3 to /usr/local

    3. Rebuild all gems on the system with sudo gem install XXX, including sqlite3-ruby. This is only necessary with platform specific gems, but i found it to be faster just to install everything in a oneliner:

      sudo gem install gem1 gem2 … gemN –no-ri –no-rdoc

    I tried to go with ruby1.9 but everything stopped working due to broken dependencies in gems and plugins, so I wouldn’t recommend switching to 1.9 unless you are up for some heavy debugging and know how to restore your old system!

    Finally everything is running again!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 300k
  • Answers 300k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You must provide the folder path to the source files,… May 13, 2026 at 7:52 pm
  • Editorial Team
    Editorial Team added an answer You can use the geocode parameter referenced here: http://apiwiki.twitter.com/Twitter-Search-API-Method:-search Or… May 13, 2026 at 7:52 pm
  • Editorial Team
    Editorial Team added an answer In the client side i have used jquery and Repeater… May 13, 2026 at 7:52 pm

Related Questions

I just upgraded to snow leopard. Before, I had everything running fine, but now
Running OS X Leopard an MacBook Pro from Jan. 2008. I used to run
I upgraded to Snow Leopard using the disc we got at WWDC. Trying to
I've got a ruby script which takes about 30 seconds to startup. It takes
I used the one-click installer to install 1.86 a while back. I wanted to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.