Error when running the command bundler install - ruby

I'm new to bundle and ruby and I've just installed bundle 2.2.17 and ruby 3.0.1. When I ran the command bundle install, I got the following error. After tracing back the error, I was still not able to understand the error and identify the reason for having this error. If someone could instruct me about how I can get started with solving this, that would be very helpful. Below is the output message I got after running the command:
Resolving dependencies....
Using concurrent-ruby 1.1.8
Using minitest 5.14.4
Using thread_safe 0.3.6
Using zeitwerk 2.4.2
Using public_suffix 4.0.6
Using bundler 2.2.17
Using colorator 1.1.0
Using coffee-script-source 1.11.1
Using execjs 2.8.1
Following files may not be writable, so sudo is needed:
/Library/Ruby/Gems/2.6.0
/Library/Ruby/Gems/2.6.0/build_info
/Library/Ruby/Gems/2.6.0/cache
/Library/Ruby/Gems/2.6.0/doc
/Library/Ruby/Gems/2.6.0/extensions
/Library/Ruby/Gems/2.6.0/gems
/Library/Ruby/Gems/2.6.0/specifications
Using faraday-excon 1.1.0
Using faraday-net_http 1.0.1
Using multipart-post 2.1.1
Using forwardable-extended 2.6.0
Using gemoji 3.0.1
Using rb-fsevent 0.11.0
Using rexml 3.2.5
Using mercenary 0.3.6
Using rouge 3.26.0
Using safe_yaml 1.0.5
Fetching http_parser.rb 0.6.0
Fetching eventmachine 1.2.7
Using liquid 4.0.3
Using jekyll-paginate 1.1.0
Using rubyzip 2.3.0
Using jekyll-swiss 1.0.0
Using unicode-display_width 1.7.0
Using tzinfo 1.2.9
Using i18n 0.9.5
Using addressable 2.7.0
Using pathutil 0.16.2
Using coffee-script 2.4.1
Using kramdown 2.3.1
Using terminal-table 1.8.0
Using activesupport 6.0.3.7
Using ruby-enum 0.9.0
Using jekyll-coffeescript 1.1.1
Using kramdown-parser-gfm 1.1.0
Fetching ffi 1.15.0
Fetching unf_ext 0.0.7.7
Fetching racc 1.5.2
Using faraday-net_http_persistent 1.1.0
Using ruby2_keywords 0.0.4
Fetching commonmarker 0.17.13
Using faraday 1.4.1
Using sawyer 0.8.2
Using octokit 4.21.0
Using jekyll-gist 1.5.0
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle config set --local path 'vendor/bundle'
bundle install
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.
Password:
Installing http_parser.rb 0.6.0 with native extensions
Installing eventmachine 1.2.7 with native extensions
Installing commonmarker 0.17.13 with native extensions
Installing racc 1.5.2 with native extensions
Installing unf_ext 0.0.7.7 with native extensions
Installing ffi 1.15.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/private/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/gems/commonmarker-0.17.13/ext/commonmarker
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20210520-20868-8zcp2h.rb extconf.rb
creating Makefile
current directory:
/private/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR=" clean
current directory:
/private/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR="
make: *** No rule to make target
`/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h',
needed by `arena.o'. Stop.
make failed, exit code 2
Gem files will remain installed in
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/gems/commonmarker-0.17.13
for inspection.
Results logged to
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/extensions/universal-darwin-19/2.6.0/commonmarker-0.17.13/gem_make.out
An error occurred while installing commonmarker (0.17.13), and Bundler cannot
continue.
Make sure that `gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
github-pages was resolved to 214, which depends on
jekyll-commonmark-ghpages was resolved to 0.1.6, which depends on
jekyll-commonmark was resolved to 1.3.1, which depends on
commonmarker
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/private/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-vi8pkcunf_ext-0.0.7.7/gems/unf_ext-0.0.7.7/ext/unf_ext
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20210520-20868-i4vcac.rb extconf.rb
checking for -lstdc++... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-static-libstdc++
--without-static-libstdc++
--with-stdc++lib
--without-stdc++lib
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in
`block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in
`mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in
`try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in
`try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:789:in
`try_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1016:in
`block in have_library'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1011:in
`have_library'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-vi8pkcunf_ext-0.0.7.7/extensions/universal-darwin-19/2.6.0/unf_ext-0.0.7.7/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-vi8pkcunf_ext-0.0.7.7/gems/unf_ext-0.0.7.7
for inspection.
Results logged to
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-vi8pkcunf_ext-0.0.7.7/extensions/universal-darwin-19/2.6.0/unf_ext-0.0.7.7/gem_make.out
An error occurred while installing unf_ext (0.0.7.7), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.7' --source 'https://rubygems.org/'` succeeds
before bundling.
In Gemfile:
github-pages was resolved to 214, which depends on
github-pages-health-check was resolved to 1.17.0, which depends on
dnsruby was resolved to 1.61.5, which depends on
simpleidn was resolved to 0.2.1, which depends on
unf was resolved to 0.1.4, which depends on
unf_ext

This error might be related to:
Rails: Your user account isn't allowed to install to the system RubyGems
after that try to execute
gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/'`
succeeds before bundling.
to check if this gem will be installed.

This is likely a duplicate of: Problem with bundler using rails (mac user)
You need to install updated xcode. Go to your terminal and run: xcode-select --install

Related

Ruby version 2.3.1 the bundle install shows error

C:\Sites\addfee>rails s
Could not find gem 'rails (= 4.2.5.1) x64-mingw32' in any of the gem sources in your Gemfile or available on this machine.
Run bundle install to install missing gems.
then I did this
C:\Sites\addfee>bundle install
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies.............................................
Using rake 11.2.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.9.0
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using pkg-config 1.1.7
Using rack 1.6.4
Using mime-types-data 3.2016.0521
Using arel 6.0.3
Installing debug_inspector 0.0.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/Ruby23-x64/bin/ruby.exe extconf.rb
Invalid argument - C:/Ruby23-x64/bin/ruby.exe extconf.rb 2>&1
Gem files will remain installed in C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/debug_inspector-0.0.2 for inspection.
Results logged to C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/debug_inspector-0.0.2/gem_make.out
Using bundler 1.12.5
Installing byebug 9.0.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/Ruby23-x64/bin/ruby.exe extconf.rb
Invalid argument - C:/Ruby23-x64/bin/ruby.exe extconf.rb 2>&1
Gem files will remain installed in C:/Ruby23-lib/ruby/gems/2.3.0/gems/byebug-9.0.5 for inspection.
Results logged to C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/byebug-9.0.5/gem_make.out
Using coffee-script-source 1.10.0
Using execjs 2.7.0
Using thor 0.19.1
Using concurrent-ruby 1.0.2
Using multi_json 1.12.1
Using sass 3.4.22
Using tilt 2.0.5
Using sqlite3 1.3.11
Using turbolinks-source 5.0.0
Using rdoc 4.2.2
Using tzinfo 1.2.2
Using nokogiri 1.6.8
Using rack-test 0.6.3
Using mime-types 3.1
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot continue.
Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before bundling.

how to fix install network_interface gem on windows

when I want to run msfconsole I see this error :
f:\metasploit\apps\pro\msf3>ruby msfconsole
Could not find network_interface-0.0.1 in any of the sources
Run bundle install to install missing gems.
when I execute 'bundle' install :
f:\metasploit\apps\pro\msf3>bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies.....
Using rake 10.4.2
Using i18n 0.6.11
Using multi_json 1.0.4
Using activesupport 3.2.21
Using builder 3.0.4
Using activemodel 3.2.21
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.2.3
Using actionpack 3.2.21
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 3.2.21
Using arel 3.0.3
Using tzinfo 0.3.42
Using activerecord 3.2.21
Using activeresource 3.2.21
Using arel-helpers 2.1.0
Using ffi 1.9.3
Using childprocess 0.5.3
Using diff-lcs 1.2.5
Using json 1.8.1
Using gherkin 2.11.6
Using cucumber 1.2.1
Using rspec-expectations 2.99.2
Using aruba 0.6.1
Using bcrypt 3.1.10
Using bundler 1.9.0
Using mini_portile 0.6.1
Using nokogiri 1.6.5
Using xpath 2.0.0
Using capybara 2.4.1
Using coderay 1.1.0
Using rack-ssl 1.3.4
Using rdoc 3.12.2
Using thor 0.19.1
Using railties 3.2.21
Using rails 3.2.21
Using cucumber-rails 1.4.0
Using factory_girl 4.4.0
Using factory_girl_rails 4.4.1
Using fivemat 1.2.1
Using rkelly-remix 0.0.6
Using jsobfu 0.2.1
Using metasploit-concern 0.3.0
Using metasploit-model 0.29.0
Using pg 0.18.1
Using recog 1.0.16
Using metasploit_data_models 0.22.8
Using rubyntlm 0.4.0
Using rubyzip 1.1.7
Using metasploit-credential 0.13.19
Using meterpreter_bins 0.0.14
Using msgpack 0.5.11
Using packetfu 1.1.9
Using robots 0.10.1
Using sqlite3 1.3.10
Using metasploit-framework 4.11.0.pre.dev from source at .
Using metasploit-framework-db 4.11.0.pre.dev from source at .
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
F:/metasploit/ruby/bin/ruby.exe -r ./siteconf20150321-6764-d3wiyv.rb extcon
.rb
[*] Running checks for netifaces code...
checking for main() in -lws2_32... *** 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=F:/metasploit/ruby/bin/ruby
--with-ws2_32lib
--without-ws2_32lib
F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed
o generate an executable file. (RuntimeError)
You have to install development tools first.
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_li
rary'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:918:in `block in checkin
_for'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels)
in postpone'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpon
'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
from extconf.rb:17:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in F:/metasploit/ruby/lib/ruby/gems/2.1.0/gems/
etwork_interface-0.0.1 for inspection.
Results logged to F:/metasploit/ruby/lib/ruby/gems/2.1.0/extensions/x86-mingw32
2.1.0/network_interface-0.0.1/gem_make.out
An error occurred while installing network_interface (0.0.1), and Bundler canno
continue.
Make sure that `gem install network_interface -v '0.0.1'` succeeds before
bundling.
f:\metasploit\apps\pro\msf3>
How I can fix this error?
Thanks
cd /usr/share/metasploit-framework
apt-get install postgresql-server-dev-all
apt-get install libsqlite3-dev
gem install pg -v 0.18.1
bundle install

Unable to push Rails Bootstrap project to Heroku

I'm finished up with the railsapps.org tutorial on Rails and Bootstrap. I am not able to deploy it to Heroku though. My code is exactly as the tutorial, and I followed the directions exactly in the "Deploy" chapter, but when I run git push heroku master I get the errors below. Any ideas what is wrong?
Regards,
Jeff
$ git push heroku master
Initializing repository, done.
Counting objects: 136, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (113/113), done.
Writing objects: 100% (136/136), 27.95 KiB | 0 bytes/s, done.
Total 136 (delta 35), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.1
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Using json (1.8.1)
Installing minitest (5.3.3)
Installing rake (10.3.1)
Installing i18n (0.6.9)
Installing thread_safe (0.3.3)
Installing builder (3.2.2)
Installing mime-types (1.25.1)
Installing rack (1.5.2)
Installing erubis (2.7.0)
Installing polyglot (0.3.4)
Installing coffee-script-source (1.7.0)
Installing arel (5.0.1.20140414130214)
Installing execjs (2.0.2)
Installing sass (3.2.19)
Installing multipart-post (2.0.0)
Installing mini_portile (0.5.3)
Installing thor (0.19.1)
Installing oauth (0.4.7)
Installing multi_xml (0.5.5)
Using bundler (1.5.2)
Installing multi_json (1.10.0)
Installing hike (1.2.3)
Installing high_voltage (2.1.0)
Installing tilt (1.4.1)
Installing tzinfo (1.1.0)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/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.
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=/tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/ruby-2.1.1/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
extconf failed, exit code 1
Gem files will remain installed in /tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/bundle/ruby/2.1.0/gems/sqlite3-1.3.9 for inspection.
Results logged to /tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/sqlite3-1.3.9/gem_make.out
Installing rack-test (0.6.2)
Installing rdoc (4.1.1)
Installing treetop (1.4.15)
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.
Bundler Output: Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Using json (1.8.1)
Installing minitest (5.3.3)
Installing rake (10.3.1)
Installing i18n (0.6.9)
Installing thread_safe (0.3.3)
Installing builder (3.2.2)
Installing mime-types (1.25.1)
Installing rack (1.5.2)
Installing erubis (2.7.0)
Installing polyglot (0.3.4)
Installing coffee-script-source (1.7.0)
Installing arel (5.0.1.20140414130214)
Installing execjs (2.0.2)
Installing sass (3.2.19)
Installing multipart-post (2.0.0)
Installing mini_portile (0.5.3)
Installing thor (0.19.1)
Installing oauth (0.4.7)
Installing multi_xml (0.5.5)
Using bundler (1.5.2)
Installing multi_json (1.10.0)
Installing hike (1.2.3)
Installing high_voltage (2.1.0)
Installing tilt (1.4.1)
Installing tzinfo (1.1.0)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/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.
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=/tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/ruby-2.1.1/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
extconf failed, exit code 1
Gem files will remain installed in /tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/bundle/ruby/2.1.0/gems/sqlite3-1.3.9 for inspection.
Results logged to /tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/sqlite3-1.3.9/gem_make.out
Installing rack-test (0.6.2)
Installing rdoc (4.1.1)
Installing treetop (1.4.15)
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.
!
! Failed to install gems via Bundler.
!
! Detected sqlite3 gem which is not supported on Heroku.
! https://devcenter.heroku.com/articles/sqlite3
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:rails-bootstrap-test.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:rails-bootstrap-test.git'
According to the book, your Gemfile should look like this:
source 'https://rubygems.org'
ruby '2.1.1'
gem 'rails', '4.1.1'
gem 'sass-rails', '~> 4.0.1'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spring', group: :development
gem 'activerecord-tableless'
gem 'bootstrap-sass'
gem 'google_drive'
gem 'high_voltage'
gem 'simple_form'
group :development do
gem 'sqlite3'
gem 'better_errors'
gem 'binding_of_caller', :platforms=>[:mri_21]
gem 'quiet_assets'
gem 'rails_layout'
end
group :production do
gem 'pg'
gem 'thin'
gem 'rails_12factor'
end
Make sure gem 'sqlite3' is in the development group. SQLite is not supported on Heroku so you don't want Heroku trying to install it.
This has been a problem for others as well...including myself. I solved it by making sure sqlite3 was only in the development group and pushing to github again to update any changes.
Here are some links where it seems others have commented on this problem:
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue
Errors of pushing rails app to Heroku error occurred while installing sqlite3, and Bundler cannot continue
Ok, so weird... I ended up destroying the Heroku app and recreating it. That solved the problem it seems.

Can't run ruby app on local using foreman

I have an application named "Aadvisor", when i try to run this application on local, i do foreman start like below:
pallav#pallav-System-Product-Name:~/Workspace/Aadvisor$ foreman start
14:21:28 web.1 | started with pid 14635
14:21:28 web.1 | bundler: command not found: rackup
14:21:28 web.1 | Install missing gem executables with `bundle install`
14:21:29 web.1 | exited with code 127
14:21:29 system | sending SIGTERM to all processes
SIGTERM received
Then i do 'bundle install' :
pallav#pallav-System-Product-Name:~/Workspace/Aadvisor$ bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching additional metadata from http://rubygems.org/..
Resolving dependencies...
Using addressable (2.3.5)
Using backports (3.4.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:13:in `<main>'
Gem files will remain installed in /home/pallav/Workspace/Aadvisor/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.1.2 for inspection.
Results logged to /home/pallav/Workspace/Aadvisor/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.1.2/ext/mri/gem_make.out
An error occurred while installing bcrypt-ruby (3.1.2), and Bundler cannot continue.
Make sure that `gem install bcrypt-ruby -v '3.1.2'` succeeds before bundling.
Then i simply do gem install bcrypt-ruby -v '3.1.2', as below:
pallav#pallav-System-Product-Name:~/Workspace/Aadvisor$ gem install bcrypt-ruby -v '3.1.2'
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.9.1 directory.
Then using 'sudo' sudo gem install bcrypt-ruby -v '3.1.2', as below:
pallav#pallav-System-Product-Name:~/Workspace/Aadvisor$ sudo gem install bcrypt-ruby -v '3.1.2'
[sudo] password for pallav:
Building native extensions. This could take a while...
ERROR: Error installing bcrypt-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:13:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/bcrypt-ruby-3.1.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/bcrypt-ruby-3.1.2/ext/mri/gem_make.out
I checked the error log here:
pallav#pallav-System-Product-Name:~/Workspace/Aadvisor$ /var/lib/gems/1.9.1/gems/bcrypt-ruby-3.1.2/ext/mri/gem_make.out
bash: /var/lib/gems/1.9.1/gems/bcrypt-ruby-3.1.2/ext/mri/gem_make.out: Permission denied
My ruby version is :
pallav#pallav-System-Product-Name:~/Workspace/Aadvisor$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
My Gem file is:
source "http://rubygems.org"
gem "rack"
gem "sinatra"
gem "sinatra-contrib"
gem "json"
gem "will_paginate"
gem 'will_paginate-bootstrap'
gem "thin"
#gem "shotgun"
gem 'pg'
gem "data_mapper"
gem "dm-postgres-adapter"
gem "dm-validations"
I did installed rvm \curl -sSL https://get.rvm.io | bash and also did sudo apt-get install ruby1.9.1-dev after that i tried again doing bundle install and i get this:
pallav#pallav-System-Product-Name:~/Workspace/Aadvisor$ bundle install
Fetching source index from http://rubygems.org/
Resolving dependencies................................
Using addressable (2.3.5)
Using backports (3.4.0)
Installing bcrypt-ruby (3.1.2)
Installing daemons (1.1.9)
Installing dm-core (1.2.1)
Installing dm-aggregates (1.2.0)
Installing dm-constraints (1.2.0)
Installing dm-migrations (1.2.0)
Installing fastercsv (1.5.5)
Installing json (1.8.1)
Installing json_pure (1.8.1)
Installing multi_json (1.8.4)
Installing dm-serializer (1.2.2)
Installing dm-timestamps (1.2.0)
Installing dm-transactions (1.2.0)
Installing stringex (1.5.1)
Installing uuidtools (2.1.4)
Installing dm-types (1.2.2)
Installing dm-validations (1.2.0)
Installing data_mapper (1.2.0)
Installing data_objects (0.10.13)
Installing dm-do-adapter (1.2.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lpq... no
checking for main() in -llibpq... no
*** 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/bin/ruby1.9.1
--with-pgsql-server-dir
--without-pgsql-server-dir
--with-pgsql-server-include
--without-pgsql-server-include=${pgsql-server-dir}/include
--with-pgsql-server-lib
--without-pgsql-server-lib=${pgsql-server-dir}/lib
--with-pgsql-client-dir
--without-pgsql-client-dir
--with-pgsql-client-include
--without-pgsql-client-include=${pgsql-client-dir}/include
--with-pgsql-client-lib
--without-pgsql-client-lib=${pgsql-client-dir}/lib
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
Could not find PostgreSQL build environment (libraries & headers): Makefile not created
Gem files will remain installed in /home/pallav/Workspace/Aadvisor/vendor/bundle/ruby/1.9.1/gems/do_postgres-0.10.13 for inspection.
Results logged to /home/pallav/Workspace/Aadvisor/vendor/bundle/ruby/1.9.1/gems/do_postgres-0.10.13/ext/do_postgres/gem_make.out
An error occurred while installing do_postgres (0.10.13), and Bundler cannot continue.
Make sure that `gem install do_postgres -v '0.10.13'` succeeds before bundling.
I also tried installing gem install do_postgres -v '0.10.13' like this :
pallav#pallav-System-Product-Name:~/Workspace/Aadvisor$ sudo gem install do_postgres -v '0.10.13'
Fetching: data_objects-0.10.13.gem (100%)
Fetching: do_postgres-0.10.13.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing do_postgres:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lpq... no
checking for main() in -llibpq... no
*** 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/bin/ruby1.9.1
--with-pgsql-server-dir
--without-pgsql-server-dir
--with-pgsql-server-include
--without-pgsql-server-include=${pgsql-server-dir}/include
--with-pgsql-server-lib
--without-pgsql-server-lib=${pgsql-server-dir}/lib
--with-pgsql-client-dir
--without-pgsql-client-dir
--with-pgsql-client-include
--without-pgsql-client-include=${pgsql-client-dir}/include
--with-pgsql-client-lib
--without-pgsql-client-lib=${pgsql-client-dir}/lib
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
Could not find PostgreSQL build environment (libraries & headers): Makefile not created
Gem files will remain installed in /var/lib/gems/1.9.1/gems/do_postgres-0.10.13 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/do_postgres-0.10.13/ext/do_postgres/gem_make.out
Finally i checked the result as :
pallav#pallav-System-Product-Name:~/Workspace/Aadvisor$ /var/lib/gems/1.9.1/gems/do_postgres-0.10.13/ext/do_postgres/gem_make.out
bash: /var/lib/gems/1.9.1/gems/do_postgres-0.10.13/ext/do_postgres/gem_make.out: Permission denied
What probably could be the error.

push to heroku problems: sqlite / gems / bundler

i got a really big problem. Just started learning ruby - everything is fine. But no searching for hours to find a solution to push on heroku. but no luck. please help me, (unfortunately on a Win7)
thanks a lot:
C:\Sites\code\omrails>git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the
list of known hosts.
Enter passphrase for key '/c/Users/mdz/.ssh/id_rsa':
Counting objects: 69, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (69/69), 26.54 KiB | 0 bytes/s, done.
Total 69 (delta 5), reused 0 (delta 0)
-----> Ruby/Rails app detected
-----> WARNING: Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle -
-binstubs vendor/bundle/bin
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake (10.0.4)
Installing i18n (0.6.1)
Installing multi_json (1.7.6)
Installing activesupport (3.2.13)
Installing builder (3.0.4)
Installing activemodel (3.2.13)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.5)
Installing rack-cache (1.2)
Installing rack-test (0.6.2)
Installing hike (1.2.3)
Installing tilt (1.4.1)
Installing sprockets (2.2.2)
Installing actionpack (3.2.13)
Installing mime-types (1.23)
Installing polyglot (0.3.3)
Installing treetop (1.4.14)
Installing mail (2.5.4)
Installing actionmailer (3.2.13)
Installing arel (3.0.2)
Installing tzinfo (0.3.37)
Installing activerecord (3.2.13)
Installing activeresource (3.2.13)
Using bundler (1.3.2)
Installing coffee-script-source (1.6.2)
Installing execjs (1.4.0)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.3)
Installing json (1.8.0)
Installing rdoc (3.12.2)
Installing thor (0.18.1)
Installing railties (3.2.13)
Installing coffee-rails (3.2.2)
Installing jquery-rails (3.0.1)
Installing rails (3.2.13)
Installing sass (3.2.9)
Installing sass-rails (3.2.6)
Installing sqlite3 (1.3.7)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native ex
tension.
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-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 /tmp/build_2bxzg0nyav6hg/vendor/bundle
/ruby/1.9.1/gems/sqlite3-1.3.7 for inspection.
Results logged to /tmp/build_2bxzg0nyav6hg/vendor/bundle/ruby/1.9.1/gems/
sqlite3-1.3.7/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot co
ntinue.
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby/Rails app
You can't use SQLite on Heroku, you'll have to use PostgreSQL. You can set it up to use PostgreSQL on Heroku but SQLite in development by putting the pg gem in a production group in your Gemfile, and sqlite in a development group, but Heroku recommends you use the same database in both your development and production environments.

Resources