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

On 10/05/2011 02:02 PM, Ruby S. wrote:

les will remain installed i

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

Try changing to ruby 1.9.2 as 1.9.1is not usable with rails 3.1
On Oct 5, 2011 2:03 PM, “Ruby S.” [email protected] wrote:

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
–without-opt-include=${opt-dir}/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 S.


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

On Wed, Oct 5, 2011 at 6:02 PM, Ruby S. [email protected]
wrote:

Gemfile.
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for sqlite3.h… no
This is telling you don’t have the development files for sqlite
installed.

sqlite3.h is missing. Try ‘port install sqlite3 +universal’
or ‘yum install sqlite3-devel’ and check your shared library search path
This is suggesting you what packages to install, depending on the
platform you are.

Hope it helps.


Leonardo M…
There’s no place like ~

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

Please see my post. I tried everything that was suggested by those
messages.

On Thu, Oct 6, 2011 at 6:39 AM, Leonardo M.
[email protected]wrote:


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


Ruby S.

On 6 October 2011 17:11, Ruby S. [email protected] wrote:

Please see my post. I tried everything that was suggested by those messages.

You may have tried them, but your original post does not say that you
followed the instructions
“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).”

Or what the result was

Colin

*** extconf.rb failed ***

forums.
http://guides.rubyonrails.org/getting_started.html
So, I assumed that sqlite3 was not installed.

For more options, visit this group at
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


gplus.to/clanlaw

On 6 October 2011 21:09, Ruby S. [email protected] wrote:

Error: Nothing to do

As I said before, I am running Redhat 6.1 64bit.

I don’t know much about redhat but googling for
install sqlite-devel redhat
gave a number of hits including
http://www.sheepguardingllama.com/2008/11/installing-ruby-sqlite3-on-red-hat-or-centos-linux/
That or one of the others may be helpful

Colin

I’m sorry, I thought I said on my post that I tried the suggestion from
the
failure messages.
Anyway, this is what I got:

port install sqlite3 +universal
Command not found.

yum install sqlite3-devel
Setting up Install Process
No package sqlite3-devel available.
Error: Nothing to do

As I said before, I am running Redhat 6.1 64bit.

This is frustrating.

Thank you

On Thu, Oct 6, 2011 at 12:22 PM, Colin L. [email protected]
wrote:

wrote:

ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
the
I proceeded to make several attempts to get sqlite3 installed but got
ERROR: Failed to build gem native extension.
platform you are.
“Ruby on Rails: Talk” group.
Ruby S.

[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Ruby S.

On Thu, Oct 6, 2011 at 4:20 PM, Colin L. [email protected]
wrote:

Setting up Install Process
That or one of the others may be helpful

Colin, the link you gave me helped install sqlite3. That’s fine.
However, it looks like Rails is still looking for more dependencies,
which I
already installed, except that I hit one which I can’t see how to
address
it.
The execjs wants a javascript runtime. I installed at least three
suggested
ones:

ExecJS supports these runtimes:

and I am still having the same error messages, which I am posting
below.

I am truly sorry to bother you but I hit a wall. Also, I am not sure why
Rails does not load everything it needs. It already loads a large number
of
pre-reqs.

Thank you

rake db:create

(in /opt/rails_3.1.0/Code/Ruby/blog)
rake aborted!
Could not find a JavaScript runtime. See
https://github.com/sstephenson/execjs for a list of available runtimes.
/usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib/execjs/runtimes.rb:47:in
autodetect' /usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib/execjs.rb:5:inmodule:ExecJS
/usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib/execjs.rb:4:in
<top (required)>' /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:inrequire’
/usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in
<top (required)>' /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:inrequire’
/usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in
<top (required)>' /usr/local/lib/ruby/gems/1.9.1/gems/coffee-rails-3.1.1/lib/coffee-rails.rb:1:inrequire’
/usr/local/lib/ruby/gems/1.9.1/gems/coffee-rails-3.1.1/lib/coffee-rails.rb:1:in
<top (required)>' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:inrequire’
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in
block (2 levels) in require' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:ineach’
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in
block in require' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:ineach’
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in
require' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler.rb:120:inrequire’
/opt/rails_3.1.0/Code/Ruby/blog/config/application.rb:7:in <top (required)>' <internal:lib/rubygems/custom_require>:29:inrequire’
internal:lib/rubygems/custom_require:29:in require' /opt/rails_3.1.0/Code/Ruby/blog/Rakefile:5:in<top (required)>’
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in load' /usr/local/lib/ruby/1.9.1/rake.rb:2373:inraw_load_rakefile’
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in block in load_rakefile' /usr/local/lib/ruby/1.9.1/rake.rb:2058:instandard_exception_handling’
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in load_rakefile' /usr/local/lib/ruby/1.9.1/rake.rb:1991:inrun’
/usr/local/bin/rake:31:in `’
blog]#


Ruby S.

Leonardo,

Yes, the executable are on my path. However, you suggested to type
node,
which was the only one I had not installed.
I downloaded and built node and now I am past that issue.

However, NOW I have other issues. This is like pulling teeth. If I did
not
want to learn Rails so badly, I would drop this altogether.

This is what I am getting now:

rake db:create

(in /opt/rails_3.1.0/Code/Ruby/blog)
rake aborted!
uninitialized constant Rake::DSL
/usr/local/lib/ruby/1.9.1/rake.rb:2482:in const_missing' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:inclass:TaskLib
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in
<module:Rake>' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in<top (required)>’
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/testtask.rb:4:in
require' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/testtask.rb:4:in<top (required)>’
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/test_unit/testing.rake:2:in
require' /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/test_unit/testing.rake:2:in<top (required)>’
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/test_unit/railtie.rb:12:in
load' /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/test_unit/railtie.rb:12:inblock in class:TestUnitRailtie
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/railtie.rb:183:in
call' /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/railtie.rb:183:inblock in load_tasks’
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/railtie.rb:183:in
each' /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/railtie.rb:183:inload_tasks’
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/engine.rb:395:in
block in load_tasks' /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/application/railties.rb:8:ineach’
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/application/railties.rb:8:in
all' /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/engine.rb:395:inload_tasks’
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/application.rb:99:in
load_tasks' /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:inmethod_missing’
/opt/rails_3.1.0/Code/Ruby/blog/Rakefile:7:in <top (required)>' /usr/local/lib/ruby/1.9.1/rake.rb:2373:inload’
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in raw_load_rakefile' /usr/local/lib/ruby/1.9.1/rake.rb:2007:inblock in load_rakefile’
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in standard_exception_handling' /usr/local/lib/ruby/1.9.1/rake.rb:2006:inload_rakefile’
/usr/local/lib/ruby/1.9.1/rake.rb:1991:in run' /usr/local/bin/rake:31:in

Fri, Oct 7, 2011 at 1:26 PM, Leonardo M.
[email protected]wrote:

the

Colin, the link you gave me helped install sqlite3. That’s fine.
for example?
and I am still having the same error messages, which I am posting below.
rake aborted!

/usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in

block (2 levels) in require' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in /usr/local/lib/ruby/1.9.1/rake.rb:2007:inblock in load_rakefile’

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


Ruby S.

I downloaded rake-0.9.2 and I was able to create the DB: rake
db:create
.
Now, let me see what else I will find.

Thanks to everyone who tried to help.

On Fri, Oct 7, 2011 at 2:00 PM, Ruby S. [email protected]
wrote:

/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in
load' /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/engine.rb:395:inmethod_missing’

On 6 October 2011 21:09, Ruby S. [email protected] wrote:

Setting up Install Process

http://www.sheepguardingllama.com/2008/11/installing-ruby-sqlite3-on-red-hat-or-centos-linux/

ones:
Johnson - Mozilla SpiderMonkey embedded within Ruby

/usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib/execjs.rb:5:in

`<top (required)>’
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in
(required)>’
blog]#
.

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Ruby S.


Ruby S.

On Fri, Oct 7, 2011 at 1:38 PM, Ruby S. [email protected]
wrote:

port install sqlite3 +universal
install sqlite-devel redhat
ones:
Are those on your path? I mean, the executable for those runtimes.
Can you just run
$ node
for example?

https://github.com/sstephenson/execjs for a list of available runtimes.

/usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in

block (2 levels) in require' /opt/rails_3.1.0/Code/Ruby/blog/config/application.rb:7:in<top
/usr/local/bin/rake:31:in `’

To unsubscribe from this group, send email to

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


Leonardo M…
There’s no place like ~

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs