Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /home/arup/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb checking for sqlite3.h.

rails install

  • Please log in to reply
1 reply to this topic

#1 arup

arup

    Passenger

  • Members
  • 4 posts

Posted 11 May 2014 - 07:15 AM

I am using opensuse13.1. Now I am trying to install  Rails, but no succcess -

arup@linux-wzza:~/Rails> rails new test_app
      create  
      create  README.rdoc
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app

#.....
#.....

run  bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.3.1
Using i18n 0.6.9
Using json 1.8.1
Using minitest 5.3.3
Using thread_safe 0.3.3

#....................
#...............
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/arup/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
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.

#.............................................
#.............................................
extconf failed, exit code 1

Gem files will remain installed in /home/arup/.rvm/gems/ruby-2.1.1@test_rails/gems/sqlite3-1.3.9 for inspection.
Results logged to /home/arup/.rvm/gems/ruby-2.1.1@test_rails/extensions/x86-linux/2.1.0/sqlite3-1.3.9/gem_make.out
An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling.
         run  bundle exec spring binstub --all
/home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/resolver.rb:352:in `resolve': Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/resolver.rb:165:in `start'
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/resolver.rb:129:in `resolve'
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/definition.rb:203:in `resolve'
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/definition.rb:133:in `specs'
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/definition.rb:178:in `specs_for'
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/definition.rb:167:in `requested_specs'
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/environment.rb:18:in `requested_specs'
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:13:in `setup'
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler.rb:120:in `setup'
        from /home/arup/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/setup.rb:17:in `<top (required)>'
        from /home/arup/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/arup/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
arup@linux-wzza:~/Rails>

Then I did the below :-

arup@linux-wzza:~/Rails> sudo zypper in libsqlite3-dev
root's password:
Loading repository data...
Reading installed packages...
'libsqlite3-dev' not found in package names. Trying capabilities.
No provider of 'libsqlite3-dev' found.
Resolving package dependencies...

Nothing to do.
arup@linux-wzza:~/Rails>

I installed `sqlite3` also :

arup@linux-wzza:~/Rails> sqlite3
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

But not able to install **rails**. Can anyone tell me how to fix this ?



#2 arup

arup

    Passenger

  • Members
  • 4 posts

Posted 11 May 2014 - 11:31 AM   Best Answer

The issue is resolved. I did run the below command :

arup@linux-wzza:~> sudo zypper install sqlite-devel
Loading repository data...
Reading installed packages...
'sqlite-devel' not found in package names. Trying capabilities.
Resolving package dependencies...

The following NEW package is going to be installed:
  sqlite3-devel

1 new package to install.

.................

  • arup likes this





Also tagged with one or more of these keywords: rails, install

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users