Errors while installing sqlite3 for Rails

Hello Boys and Girls,

I don’t know where this item belong. I am posting it on both, Ruby and Rails
forums.

ruby -v

ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

rails -v

Rails 3.1.0

Red Hat Enterprise Linux Workstation release 6.0 (Santiago) (64bit)

I just installed Rails 3.1.0 as described on: *
http://guides.rubyonrails.org/getting_started.html*
One of the step while trying to create my first project was to: Creating
the Database

$rake db:create
(in /opt/rails_3.1.0/Code/Ruby/blog)
Could not find gem ‘sqlite3 (>= 0)’ in any of the gem sources listed in your
Gemfile.

So, I assumed that sqlite3 was not installed.
I proceeded to make several attempts to get sqlite3 installed but got
errors. I also tried installing sqlite3-devel as suggested below by the
error messages, but got errors.

gem install sqlite3

Building native extensions. This could take a while…
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/ext/builder.rb:48: warning:
Insecure world writable dir /usr/local/shoes in PATH, mode 040777
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb

checking for sqlite3.h… no
sqlite3.h is missing. Try 'port install sqlite3 +universal’
or ‘yum install sqlite3-devel’ and check your shared library search path
(the
location where your sqlite3 shared library is located).
*** 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.

Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/usr/local/bin/ruby
–with-sqlite3-dir
–without-sqlite3-dir
–with-sqlite3-include
–without-sqlite3-include=${sqlite3-dir}/include
–with-sqlite3-lib
–without-sqlite3-lib=${sqlite3-dir}/lib
–enable-local
–disable-local

Gem files will remain installed in
/usr/local/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.4 for inspection.
Results logged to
/usr/local/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.4/ext/sqlite3/gem_make.out

Any help will be apprecited

Thank you

···


Ruby Student


You received this message because you are subscribed to the Google Groups “Ruby on Rails: Talk” group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

It appears that sqlite3-devel libraries are not installed on your system.

···

On 10/05/2011 02:02 PM, Ruby Student wrote:

les will remain installed i

How do I get those libraries? I tried installing sqlite3, as you can see,
but failed.

···

On Wed, Oct 5, 2011 at 5:20 PM, brettg <brettg@hq.newdream.net> wrote:

On 10/05/2011 02:02 PM, Ruby Student wrote:

les will remain installed i

It appears that sqlite3-devel libraries are not installed on your system.

--
Ruby Student