Hosting on netlify
My pg is running locally and with lsof -i :5432 my pg is running on my account just fine. But when I try to host on netlify I get
In Gemfile: pg Error during gem install
when trying to deploy the site full log below
I have also tried deploying to heroku as well but react routers for some reason is not working with it. It displays my homepage but my routes display nothing (works locally tho).
12:03:04 PM: Build ready to start
12:03:06 PM: build-image version: 081db65c3e4ce8423fedb40e7689a87de6f84667
12:03:06 PM: build-image tag: v4.3.1
12:03:06 PM: buildbot version: f650485c830eb31597911322420b99299a4303b8
12:03:06 PM: Building without cache
12:03:06 PM: Starting to prepare the repo for build
12:03:06 PM: No cached dependencies found. Cloning fresh repo
12:03:06 PM: git clone https://github.com/IvanWiesner/prison-joe-fixed
12:03:07 PM: Preparing Git Reference refs/heads/main
12:03:08 PM: Parsing package.json dependencies
12:03:08 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'dist' versus 'dist/' in the Netlify UI
12:03:08 PM: Starting build script
12:03:08 PM: Installing dependencies
12:03:08 PM: Python version set to 2.7
12:03:09 PM: Downloading and installing node v16.10.0...
12:03:09 PM: Downloading https://nodejs.org/dist/v16.10.0/node-v16.10.0-linux-x64.tar.xz...
12:03:10 PM: Computing checksum with sha256sum
12:03:10 PM: Checksums matched!
12:03:13 PM: Now using node v16.10.0 (npm v7.24.0)
12:03:13 PM: Started restoring cached build plugins
12:03:13 PM: Finished restoring cached build plugins
12:03:13 PM: Required ruby-2.7.4 is not installed.
12:03:13 PM: To install do: 'rvm install "ruby-2.7.4"'
12:03:13 PM: Attempting ruby version ruby-2.7.4, read from .ruby-version file
12:03:14 PM: Required ruby-2.7.4 is not installed - installing.
12:03:14 PM: Searching for binary rubies, this might take some time.
12:03:16 PM: Found remote file https://rubies.travis-ci.org/ubuntu/20.04/x86_64/ruby-2.7.4.tar.bz2
12:03:16 PM: Checking requirements for ubuntu.
12:03:17 PM: Requirements installation successful.
12:03:17 PM: ruby-2.7.4 - #configure
12:03:17 PM: ruby-2.7.4 - #download
12:03:18 PM: No checksum for downloaded archive, recording checksum in user configuration.
12:03:18 PM: ruby-2.7.4 - #validate archive
12:03:21 PM: ruby-2.7.4 - #extract
12:03:23 PM: ruby-2.7.4 - #validate binary
12:03:23 PM: ruby-2.7.4 - #setup
12:03:24 PM: ruby-2.7.4 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.4@global
12:03:24 PM: ruby-2.7.4 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
12:03:24 PM: ruby-2.7.4 - #generating global wrappers........
12:03:25 PM: ruby-2.7.4 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.4
12:03:25 PM: ruby-2.7.4 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
12:03:25 PM: ruby-2.7.4 - #generating default wrappers........
12:03:25 PM: Using /opt/buildhome/.rvm/gems/ruby-2.7.4
12:03:26 PM: Using ruby version 2.7.4
12:03:26 PM: Using bundler version 2.2.26 from Gemfile.lock
12:03:27 PM: Successfully installed bundler-2.2.26
12:03:27 PM: 1 gem installed
12:03:27 PM: Using PHP version 8.0
12:03:27 PM: Started restoring cached ruby gems
12:03:27 PM: Finished restoring cached ruby gems
12:03:27 PM: Installing gem bundle
12:03:27 PM: [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local path '/opt/build/cache/bundle'`, and stop using this flag
12:03:27 PM: [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs --all`
12:03:29 PM: Fetching gem metadata from https://rubygems.org/............
12:03:29 PM: Fetching rake 13.0.6
12:03:29 PM: Installing rake 13.0.6
12:03:29 PM: Fetching concurrent-ruby 1.1.9
12:03:29 PM: Fetching minitest 5.14.4
12:03:29 PM: Fetching builder 3.2.4
12:03:29 PM: Fetching zeitwerk 2.4.2
12:03:29 PM: Fetching racc 1.5.2
12:03:29 PM: Fetching rack 2.2.3
12:03:29 PM: Fetching crass 1.0.6
12:03:29 PM: Fetching erubi 1.10.0
12:03:30 PM: Installing builder 3.2.4
12:03:30 PM: Installing minitest 5.14.4
12:03:30 PM: Installing crass 1.0.6
12:03:30 PM: Installing rack 2.2.3
12:03:30 PM: Installing zeitwerk 2.4.2
12:03:30 PM: Fetching nio4r 2.5.8
12:03:30 PM: Installing racc 1.5.2 with native extensions
12:03:30 PM: Fetching websocket-extensions 0.1.5
12:03:30 PM: Installing erubi 1.10.0
12:03:30 PM: Fetching marcel 1.0.1
12:03:30 PM: Installing concurrent-ruby 1.1.9
12:03:30 PM: Installing websocket-extensions 0.1.5
12:03:30 PM: Installing marcel 1.0.1
12:03:30 PM: Fetching mini_mime 1.1.1
12:03:30 PM: Installing nio4r 2.5.8 with native extensions
12:03:30 PM: Fetching jsonapi-renderer 0.2.2
12:03:30 PM: Fetching bcrypt 3.1.16
12:03:30 PM: Installing mini_mime 1.1.1
12:03:30 PM: Installing jsonapi-renderer 0.2.2
12:03:30 PM: Fetching msgpack 1.4.2
12:03:30 PM: Installing bcrypt 3.1.16 with native extensions
12:03:30 PM: Using bundler 2.2.26
12:03:30 PM: Fetching byebug 11.1.3
12:03:30 PM: Installing msgpack 1.4.2 with native extensions
12:03:30 PM: Fetching ffi 1.15.4
12:03:30 PM: Installing byebug 11.1.3 with native extensions
12:03:30 PM: Installing ffi 1.15.4 with native extensions
12:03:48 PM: Fetching rb-fsevent 0.11.0
12:03:48 PM: Fetching method_source 1.0.0
12:03:48 PM: Fetching thor 1.1.0
12:03:48 PM: Fetching spring 2.1.1
12:03:48 PM: Fetching pg 1.2.3
12:03:48 PM: Fetching websocket-driver 0.7.5
12:03:48 PM: Fetching mail 2.7.1
12:03:48 PM: Fetching rack-test 1.1.0
12:03:48 PM: Installing method_source 1.0.0
12:03:48 PM: Installing spring 2.1.1
12:03:48 PM: Installing rack-test 1.1.0
12:03:48 PM: Installing thor 1.1.0
12:03:48 PM: Installing websocket-driver 0.7.5 with native extensions
12:03:48 PM: Installing rb-fsevent 0.11.0
12:03:48 PM: Installing pg 1.2.3 with native extensions
12:03:49 PM: Fetching rack-cors 1.1.1
12:03:49 PM: Fetching i18n 1.8.10
12:03:49 PM: Installing mail 2.7.1
12:03:49 PM: Installing i18n 1.8.10
12:03:49 PM: Installing rack-cors 1.1.1
12:03:49 PM: Fetching tzinfo 2.0.4
12:03:49 PM: Installing tzinfo 2.0.4
12:03:49 PM: Fetching puma 5.4.0
12:03:49 PM: Fetching bootsnap 1.8.1
12:03:49 PM: Fetching sprockets 4.0.2
12:03:49 PM: Fetching nokogiri 1.12.4 (x86_64-linux)
12:03:49 PM: Fetching rb-inotify 0.10.1
12:03:49 PM: Fetching faker 2.19.0
12:03:49 PM: Fetching activesupport 6.1.4.1
12:03:49 PM: Installing rb-inotify 0.10.1
12:03:49 PM: Installing bootsnap 1.8.1 with native extensions
12:03:49 PM: Installing sprockets 4.0.2
12:03:50 PM: Installing activesupport 6.1.4.1
12:03:50 PM: Installing puma 5.4.0 with native extensions
12:03:50 PM: Installing faker 2.19.0
12:03:50 PM: Installing nokogiri 1.12.4 (x86_64-linux)
12:03:53 PM: Fetching listen 3.7.0
12:03:53 PM: Fetching globalid 0.5.2
12:03:53 PM: Fetching case_transform 0.2
12:03:53 PM: Fetching activemodel 6.1.4.1
12:03:53 PM: Fetching rails-dom-testing 2.0.3
12:03:53 PM: Fetching loofah 2.12.0
12:03:53 PM: Installing case_transform 0.2
12:03:53 PM: Installing rails-dom-testing 2.0.3
12:03:53 PM: Installing globalid 0.5.2
12:03:53 PM: Installing listen 3.7.0
12:03:53 PM: Installing loofah 2.12.0
12:03:53 PM: Installing activemodel 6.1.4.1
12:03:53 PM: Fetching activejob 6.1.4.1
12:03:53 PM: Fetching rails-html-sanitizer 1.4.2
12:03:53 PM: Installing activejob 6.1.4.1
12:03:53 PM: Installing rails-html-sanitizer 1.4.2
12:03:54 PM: Fetching actionview 6.1.4.1
12:03:54 PM: Fetching activerecord 6.1.4.1
12:03:54 PM: Installing actionview 6.1.4.1
12:03:54 PM: Installing activerecord 6.1.4.1
12:03:54 PM: Fetching actionpack 6.1.4.1
12:03:54 PM: Installing actionpack 6.1.4.1
12:03:54 PM: Fetching activestorage 6.1.4.1
12:03:54 PM: Fetching actionmailer 6.1.4.1
12:03:54 PM: Fetching actioncable 6.1.4.1
12:03:54 PM: Fetching active_model_serializers 0.10.12
12:03:54 PM: Fetching railties 6.1.4.1
12:03:54 PM: Fetching sprockets-rails 3.2.2
12:03:54 PM: Installing actionmailer 6.1.4.1
12:03:54 PM: Installing actioncable 6.1.4.1
12:03:54 PM: Installing sprockets-rails 3.2.2
12:03:54 PM: Installing active_model_serializers 0.10.12
12:03:54 PM: Installing activestorage 6.1.4.1
12:03:54 PM: Installing railties 6.1.4.1
12:03:55 PM: Fetching actionmailbox 6.1.4.1
12:03:55 PM: Fetching actiontext 6.1.4.1
12:03:55 PM: Installing actionmailbox 6.1.4.1
12:03:55 PM: Installing actiontext 6.1.4.1
12:03:55 PM: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
12:03:55 PM: current directory: /opt/build/cache/bundle/ruby/2.7.0/gems/pg-1.2.3/ext
12:03:55 PM: /opt/buildhome/.rvm/rubies/ruby-2.7.4/bin/ruby -I
12:03:55 PM: /opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0 -r
12:03:55 PM: ./siteconf20210928-3304-6jjawu.rb extconf.rb
12:03:55 PM: checking for pg_config... no
12:03:55 PM: No pg_config... trying anyway. If building fails, please try again with
12:03:55 PM: --with-pg-config=/path/to/pg_config
12:03:55 PM: checking for libpq-fe.h... no
12:03:55 PM: Can't find the 'libpq-fe.h header
12:03:55 PM: *** extconf.rb failed ***
12:03:55 PM: Could not create Makefile due to some reason, probably lack of necessary
12:03:55 PM: libraries and/or headers. Check the mkmf.log file for more details. You may
12:03:55 PM: need configuration options.
12:03:55 PM: Provided configuration options:
12:03:55 PM: --with-opt-dir
12:03:55 PM: --without-opt-dir
12:03:55 PM: --with-opt-include
12:03:55 PM: --without-opt-include=${opt-dir}/include
12:03:55 PM: --with-opt-lib
12:03:55 PM: --without-opt-lib=${opt-dir}/lib
12:03:55 PM: --with-make-prog
12:03:55 PM: --without-make-prog
12:03:55 PM: --srcdir=.
12:03:55 PM: Creating deploy upload records
12:03:55 PM: --curdir
12:03:55 PM: --ruby=/opt/buildhome/.rvm/rubies/ruby-2.7.4/bin/$(RUBY_BASE_NAME)
12:03:55 PM: --with-pg
12:03:55 PM: --without-pg
12:03:55 PM: --enable-windows-cross
12:03:55 PM: --disable-windows-cross
12:03:55 PM: --with-pg-config
12:03:55 PM: --without-pg-config
12:03:55 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
12:03:55 PM: --with-pg_config
12:03:55 PM: --without-pg_config
12:03:55 PM: --with-pg-dir
12:03:55 PM: --without-pg-dir
12:03:55 PM: --with-pg-include
12:03:55 PM: --without-pg-include=${pg-dir}/include
12:03:55 PM: --with-pg-lib
12:03:55 PM: --without-pg-lib=${pg-dir}/lib
12:03:55 PM: To see why this extension failed to compile, please check the mkmf.log which can
12:03:55 PM: be found here:
12:03:55 PM: /opt/build/cache/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/pg-1.2.3/mkmf.log
12:03:55 PM: extconf failed, exit code 1
12:03:55 PM: Gem files will remain installed in
12:03:55 PM: /opt/build/cache/bundle/ruby/2.7.0/gems/pg-1.2.3 for inspection.
12:03:55 PM: Results logged to
12:03:55 PM: /opt/build/cache/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/pg-1.2.3/gem_make.out
12:03:55 PM: /opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/ext/builder.rb:99:in
12:03:55 PM: `run'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:48:in
`block in build'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/tempfile.rb:291:in `open'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:30:in
`build'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/ext/builder.rb:169:in
12:03:55 PM: `block in build_extension'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in
`synchronize'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in
12:03:55 PM: `build_extension'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/ext/builder.rb:210:in
`block in build_extensions'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in
12:03:55 PM: `each'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in
`build_extensions'
/opt/buildhome/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/rubygems/installer.rb:844:in
12:03:55 PM: `build_extensions'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/rubygems_gem_installer.rb:66:in
`build_extensions'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/rubygems_gem_installer.rb:26:in
12:03:55 PM: `install'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/source/rubygems.rb:192:in
`install'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/installer/gem_installer.rb:54:in
12:03:55 PM: `install'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/installer/parallel_installer.rb:186:in
12:03:55 PM: `do_install'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/worker.rb:62:in
12:03:55 PM: `apply_func'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/worker.rb:57:in
`block in process_queue'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/worker.rb:54:in
12:03:55 PM: `loop'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/worker.rb:54:in
`process_queue'
/opt/buildhome/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.26/lib/bundler/worker.rb:91:in
12:03:55 PM: `block (2 levels) in create_threads'
An error occurred while installing pg (1.2.3), and Bundler cannot continue.
In Gemfile:
pg
Error during gem install
12:03:55 PM: Build was terminated: Build script returned non-zero exit code: 1
12:03:55 PM: Failing build: Failed to build site
12:03:55 PM: Finished processing build request in 49.373621319s
from Recent Questions - Stack Overflow https://ift.tt/3F39naK
https://ift.tt/eA8V8J
Comments
Post a Comment