I am trying to install the datamapper gem on mac os x lion but am getting failed to build gem native extension while installing the sqlite adapter (see terminal output below). The two solutions I found from google and other stack overflow questions have been to use sudo or install Xcode but I am already using sudo and have Xcode 4.3.3 installed from the app store.
sudo gem install dm-sqlite-adapter Password: Building native extensions. This could take a while... ERROR: Error installing dm-sqlite-adapter: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/do_sqlite3-0.10.8 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/do_sqlite3-0.10.8/ext/do_sqlite3/gem_make.out
gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
gem_make.out
file? They might give us a clue on how to approach this. – Amir