Reputation: 3339
I'm trying to run "bundle install" to my new rails app! my ruby version:
ruby 2.3.0p0
my rails version:
Rails 4.1.0
my rvm version:
rvm 1.26.11 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
but I got this Error !
Fetching gem metadata from http://rubygems.org/...........
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Resolving dependencies...........
Rubygems 2.0.3 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
Using rake 11.1.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using rack 1.5.5
Using mime-types 1.25.1
Using polyglot 0.3.5
Using arel 5.0.1.20140414130214
Using bundler 1.11.2
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using thor 0.19.1
Using hike 1.2.3
Using multi_json 1.11.3
Using tilt 1.4.1
Using sass 3.2.19
Using spring 1.7.1
Installing sqlite3 1.3.11 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/afsane/.rvm/rubies/ruby-2.3.0/bin/ruby extconf.rb
checking for sqlite3.h... *** 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=/home/afsane/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
/home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:587:in `try_cpp'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:1144:in `block in find_header'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:1143:in `find_header'
from extconf.rb:30:in `<main>'
Gem files will remain installed in /home/afsane/.rvm/gems/ruby-2.3.0/gems/sqlite3-1.3.11 for inspection.
Results logged to /home/afsane/.rvm/gems/ruby-2.3.0/gems/sqlite3-1.3.11/ext/sqlite3/gem_make.out
Using rdoc 4.2.2
Using tzinfo 1.2.2
Using rack-test 0.6.3
Using treetop 1.4.15
Using coffee-script 2.4.1
Using uglifier 3.0.0
Using sprockets 2.12.4
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
afsane@afsaneF:~/Desktop/Afsaneh/test2$ clear
afsane@afsaneF:~/Desktop/Afsaneh/test2$ cd
afsane@afsaneF:~$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
afsane@afsaneF:~$ ^C
afsane@afsaneF:~$ rails -v
Rails 4.1.0
afsane@afsaneF:~$ rvm -v
rvm 1.26.11 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
afsane@afsaneF:~$ cd Desktop
afsane@afsaneF:~/Desktop$ cd Afsaneh
afsane@afsaneF:~/Desktop/Afsaneh$ cd test1
afsane@afsaneF:~/Desktop/Afsaneh/test1$ bundle install
Fetching gem metadata from http://rubygems.org/...........
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Resolving dependencies...........
Rubygems 2.0.3 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
Using rake 11.1.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using rack 1.5.5
Using mime-types 1.25.1
Using polyglot 0.3.5
Using arel 5.0.1.20140414130214
Using bundler 1.11.2
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using thor 0.19.1
Using columnize 0.9.0
Using debugger-linecache 1.2.0
Using debugger-ruby_core_source 1.3.8
Using hike 1.2.3
Using multi_json 1.11.3
Using tilt 1.4.1
Using sass 3.2.19
Using spring 1.7.1
Installing sqlite3 1.3.11 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/afsane/.rvm/rubies/ruby-2.3.0/bin/ruby extconf.rb
checking for sqlite3.h... *** 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=/home/afsane/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
/home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:587:in `try_cpp'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:1144:in `block in find_header'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:1143:in `find_header'
from extconf.rb:30:in `<main>'
Gem files will remain installed in /home/afsane/.rvm/gems/ruby-2.3.0/gems/sqlite3-1.3.11 for inspection.
Results logged to /home/afsane/.rvm/gems/ruby-2.3.0/gems/sqlite3-1.3.11/ext/sqlite3/gem_make.out
Using rdoc 4.2.2
Using tzinfo 1.2.2
Using rack-test 0.6.3
Using treetop 1.4.15
Using coffee-script 2.4.1
Using uglifier 3.0.0
Installing debugger 1.6.8 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/afsane/.rvm/rubies/ruby-2.3.0/bin/ruby extconf.rb
*** 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=/home/afsane/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
/home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/fileutils.rb:1392:in `initialize': No such file or directory @ rb_sysopen - ./230/ruby_debug.h (Errno::ENOENT)
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/fileutils.rb:1392:in `open'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/fileutils.rb:1392:in `copy_file'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/fileutils.rb:486:in `copy_file'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/fileutils.rb:403:in `block in cp'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/fileutils.rb:1571:in `block in fu_each_src_dest'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/fileutils.rb:1585:in `fu_each_src_dest0'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/fileutils.rb:1569:in `fu_each_src_dest'
from /home/afsane/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/fileutils.rb:402:in `cp'
from extconf.rb:83:in `block in <main>'
from extconf.rb:82:in `each'
from extconf.rb:82:in `<main>'
Gem files will remain installed in /home/afsane/.rvm/gems/ruby-2.3.0/gems/debugger-1.6.8 for inspection.
Results logged to /home/afsane/.rvm/gems/ruby-2.3.0/gems/debugger-1.6.8/ext/ruby_debug/gem_make.out
Using sprockets 2.12.4
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
mentioned that because the https is blocked in my country I have to changed it to http .I always do that on my pc. Also my OS is : Ubuntu 14.04.4 LTS
I've tried some solutions such as :
sudo apt-get install sqliteman sqlite3
sudo gem install sqlite3 -v '1.3.7'
sudo apt-get install -y sqlite3 libsqlite3-dev
gem install sqlite3
sudo gem update --system
and so on... but none of them worked for me ! Could you please tell me how can I download Sqlite3 Dependencies or maybe how I can install gem native extension ??? Thanks In advance for your consideration :)
Upvotes: 0
Views: 845
Reputation: 3285
This may be a duplicate of sqlite3 gem fails to install.
Does it work when you do
gem install sqlite3 -- --with-sqlite3-dir=/opt/local
or prepend Sudo if you need to.
Upvotes: 1