David Dennis wrote: > Robert Dober wrote: >> On Tue, Nov 25, 2008 at 10:38 AM, Ben Johnson <bjohnson / binarylogic.com> >> wrote: >>> Ever since I updated my gems I have been getting the following error any >>> time I want to use sqlite in ruby: >>> >>> no such file to load -- sqlite3 (MissingSourceFile) >> Did you do the threaded >> require 'rubygems' >> R. > > Hi, > > Could you explain this more? I have seen this error reported over and > over throughout the internet but no concise explanation is to be found. > > Suggestions are: > > 1) gem install sqlite3-ruby > > but then I get this error: > > Building native extensions. This could take a while... > ERROR: Error installing sqlite3-ruby: > ERROR: Failed to build gem native extension. > > /usr/bin/ruby extconf.rb install sqlite3-ruby > checking for fdatasync() in -lrt... yes > checking for sqlite3.h... no > > make > make: *** No rule to make target `ruby.h', needed by > `sqlite3_api_wrap.o'. Stop. > > > Gem files will remain installed in > /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4 for inspection. > Results logged to > /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out > > 2) sudo gem install sqlite3-ruby > > But unfortunately I don't have admin access to my dedicated server > > The binary works correctly which is the most annoying part. When I type > 'sqlite3' I get a prompt for playing with the database. I also get the > same "no such file to load -- sqlite3" when I run the first "db:create" > after creating a demo app. > > sqlite3 works with rails on my local windows PC. I don't understand why > it's so impossible on the linux box. > > Thanks, David. It is not impossible but it is unfortunate litle more complicated. With windows you already get compiled binary needed for sqlite3-ruby to work. With Linux binary has to be compiled for your distribution and here it is almost essential that you have admin rights. I guess you are on Ubuntu. So you need to: sudo apt-get install build-essential ruby1.8-dev libsqlite3-dev First one is compiler environment Second are ruby headers needed to compile addons with ruby Third are sqlite3 headers by TheR -- Posted via http://www.ruby-forum.com/.