LoadError: no such file to load -- sqlite3/database
I saw this post..
http://www.ruby-forum.com/topic/144703#641008
And it seems that this is most commonly a problem if people don't have
the sqlite3 libraries and headers installed when they build the
sqlite3-ruby module. I've got those.
"gem install sqlite3-ruby" only populates
/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2
but if I download the gem from rubyforge, and build and install it by
hand, it puts stuff in both...
/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2
/usr/lib/ruby/site_ruby/1.8/sqlite3
and creates /usr/lib/ruby/site_ruby/1.8/i686-linux/sqlite3_api.so..
which takes of the "LoadError: no such file to load..." problem.
Any ideas why installing sqlite3 via gem doesn't work, but building it
by hand does?
--
Posted via http://www.ruby-forum.com/.
I do have ruby 1.8.6 (not p230 - that was causing issues). Linux
2.6.23.1, glibc 2.3.6, sqlite 3.5.9 installed from source.
As far as I know, the other gems we're using are working ok.
>
> Oh yeah.. this is Rails 2.1.
when you built the gem did you tell it where to find the sqlite
headers. Did it print the 'building native extension' blurb ?
Fred
# gem install sqlite3-ruby
Building native extensions. This could take a while...
Successfully installed sqlite3-ruby-1.2.2
1 gem installed
Installing ri documentation for sqlite3-ruby-1.2.2...
Installing RDoc documentation for sqlite3-ruby-1.2.2...
That specific error happened to me on Ubuntu, and I had to install
libsqlite3-ruby. I know you don't have access to packages, but maybe you
can look into that package's content to figure out what you need.
I found this evening that I have this same issue on a new Debian install.
> dpkg -l|grep sqlite3
ii libsqlite3-0 3.3.8-1.1
SQLite 3 shared library
ii libsqlite3-dev 3.3.8-1.1
SQLite 3 development files
ii libsqlite3-ruby 1.1.0-2
SQLite3 interface for Ruby
ii libsqlite3-ruby1.8 1.1.0-2
SQLite3 interface for Ruby 1.8
ii sqlite3 3.3.8-1.1
A command line interface for SQLite 3
> gem list --local
actionmailer (2.1.0)
actionpack (2.1.0)
activerecord (2.1.0)
activeresource (2.1.0)
activesupport (2.1.0)
hoe (1.6.0)
mysql (2.7)
paginator (1.1.1)
rails (2.1.0)
rake (0.8.1)
rcov (0.8.1.2.0)
rubyforge (1.0.0)
sqlite3-ruby (1.2.2)
> ruby -v
ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-linux]
> uname -a
Linux mercury 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 GNU/Linux
--
Greg Donald
http://destiney.com/
An older version seems to work.
gem uninstall sqlite3-ruby
gem install sqlite3-ruby -v=1.2.1
The only method that really seems to work for me is to download the gem
from rubyforge and to build and install it by hand. :\