Forum: Ruby on Rails Installing sqlite3-ruby with rubygems on Ubuntu 8.0.4.1

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4a7f4bd240ef9f3af4f5550584599ffe?d=identicon&s=25 big choco (bigchoco)
on 2008-11-08 10:28
Hi everyone,

I'm on Ubuntu Hardy and I just installed

ruby1.8
irb1.8
ri1.8
rdoc1.8
rubygems
ruby1.8-dev

I then intalled rails with rubygems and had to run the gem update
--system command once I wanted to create my first rails project,

I also have to install the sqlite3-ruby gem but each time I try to
here's the error I get :

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/bin/ruby1.8 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


So I'm probably missing some libraries or maybe a environment variable,
could you please help me sort this out, I'd be enlightned

Cheers :)

bigchoco
4a7f4bd240ef9f3af4f5550584599ffe?d=identicon&s=25 big choco (bigchoco)
on 2008-11-08 10:32

Ok solved my problem by installing the sqlite3-dev packages sorry for
being impatient

Happy coding :p
Cffe91a6cc6e6ce8213ed575821dadf7?d=identicon&s=25 Anatoly Mikhailov (mikhailov)
on 2009-03-03 03:19
Agree! I see the problem with install gem sqlite3-ruby. This way help me
to fix it! Just install developer headers for provide compile the
library from sources.
SQLite3:

Without the -d option, rails will default to sqlite. To install SQLite3:

~$ sudo apt-get install libsqlite3-0 libsqlite3-dev
~$ sudo gem install sqlite3-ruby


big choco wrote:
>
>
> Ok solved my problem by installing the sqlite3-dev packages sorry for
> being impatient
>
> Happy coding :p
This topic is locked and can not be replied to.