Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku deploy not functioning #2797

Closed
jacobherrington opened this issue Jul 10, 2018 · 9 comments
Closed

Heroku deploy not functioning #2797

jacobherrington opened this issue Jul 10, 2018 · 9 comments

Comments

@jacobherrington
Copy link
Contributor

jacobherrington commented Jul 10, 2018

Steps to reproduce

Click the Heroku deploy button in the readme :)

Expected behavior

It should deploy a Solidus sandbox app

Actual behavior

It breaks during deployment, here is the log:



-----> Ruby app detected

-----> Compiling Ruby/Rails

       Compiling solidus

WARNING:  You don't have /app/.gem/ruby/2.3.0/bin in your PATH,

	  gem executables will not run.

Successfully installed concurrent-ruby-1.0.5

Successfully installed i18n-1.0.1

Successfully installed thread_safe-0.3.6

Successfully installed tzinfo-1.2.5

Successfully installed activesupport-5.1.6

Successfully installed rack-2.0.5

Successfully installed rack-test-1.0.0

Successfully installed mini_portile2-2.3.0

Building native extensions.  This could take a while...

ERROR:  Error installing railties:

	ERROR: Failed to build gem native extension.

    current directory: /app/.gem/ruby/2.3.0/gems/nokogiri-1.8.4/ext/nokogiri

/usr/bin/ruby2.3 -r ./siteconf20180710-108-7rcv9t.rb extconf.rb

checking if the C compiler accepts ... yes

Building nokogiri using system libraries.

pkg-config could not be used to find libxml-2.0

Please install either `pkg-config` or the pkg-config gem per

    gem install pkg-config -v "~> 1.1"

pkg-config could not be used to find libxslt

Please install either `pkg-config` or the pkg-config gem per

    gem install pkg-config -v "~> 1.1"

pkg-config could not be used to find libexslt

Please install either `pkg-config` or the pkg-config gem per

    gem install pkg-config -v "~> 1.1"

ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.

*** 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/$(RUBY_BASE_NAME)2.3

	--help

	--clean

	--use-system-libraries=true

	--with-zlib-dir

	--without-zlib-dir

	--with-zlib-include

	--without-zlib-include=${zlib-dir}/include

	--with-zlib-lib

	--without-zlib-lib=${zlib-dir}/lib

	--with-xml2-dir

	--without-xml2-dir

	--with-xml2-include

	--without-xml2-include=${xml2-dir}/include

	--with-xml2-lib

	--without-xml2-lib=${xml2-dir}/lib

	--with-libxml-2.0-config

	--without-libxml-2.0-config

	--with-pkg-config

	--without-pkg-config

	--with-xslt-dir

	--without-xslt-dir

	--with-xslt-include

	--without-xslt-include=${xslt-dir}/include

	--with-xslt-lib

	--without-xslt-lib=${xslt-dir}/lib

	--with-libxslt-config

	--without-libxslt-config

	--with-exslt-dir

	--without-exslt-dir

	--with-exslt-include

	--without-exslt-include=${exslt-dir}/include

	--with-exslt-lib

	--without-exslt-lib=${exslt-dir}/lib

	--with-libexslt-config

	--without-libexslt-config

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /app/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.8.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /app/.gem/ruby/2.3.0/gems/nokogiri-1.8.4 for inspection.

Results logged to /app/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.8.4/gem_make.out

logger: unrecognized option '--user-install'

Usage:

 logger [options] [<message>]

Enter messages into the system log.

Options:

 -i                       log the logger command's PID

     --id[=<id>]          log the given <id>, or otherwise the PID

 -f, --file <file>        log the contents of this file

 -e, --skip-empty         do not log empty lines when processing files

     --no-act             do everything except the write the log

 -p, --priority <prio>    mark given message with this priority

     --octet-count        use rfc6587 octet counting

     --prio-prefix        look for a prefix on every line read from stdin

 -s, --stderr             output message to standard error as well

 -S, --size <size>        maximum size for a single message

 -t, --tag <tag>          mark every line with this tag

 -n, --server <name>      write to this remote syslog server

 -P, --port <number>      use this UDP port

 -T, --tcp                use TCP only

 -d, --udp                use UDP only

     --rfc3164            use the obsolete BSD syslog protocol

     --rfc5424[=<snip>]   use the syslog protocol (the default for remote);

                            <snip> can be notime, or notq, and/or nohost

     --msgid <msgid>      set rfc5424 message id field

 -u, --socket <socket>    write to this Unix socket

     --socket-errors[=<on|off|auto>]

                          print connection errors when using Unix sockets

     --journald[=<file>]  write journald entry

 -h, --help     display this help and exit

 -V, --version  output version information and exit

For more details see logger(1).

 !

 !     "NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install --user-install --no-ri --no-rdoc railties:'~>5.1.0'" failed

 !

/app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/lib/language_pack/solidus.rb:86:in `sh': "NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install --user-install --no-ri --no-rdoc railties:'~>5.1.0'" failed (RuntimeError)

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/lib/language_pack/solidus.rb:24:in `compile'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/bin/compile:16:in `block (2 levels) in <main>'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/lib/language_pack/base.rb:131:in `log'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/bin/compile:15:in `block in <main>'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/lib/language_pack/instrument.rb:35:in `block in trace'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/lib/language_pack/instrument.rb:17:in `block in instrument'

	from /usr/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/lib/language_pack/instrument.rb:16:in `instrument'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/lib/language_pack/instrument.rb:35:in `trace'

	from /app/tmp/buildpacks/4503e3a76977915f47253edc22ff766cf41874cec155814eeb2bed137037cc920729733d948ffeb2124e6612e9bfcc160ea3849de67fe7190e0f7d126454c288/bin/compile:11:in `<main>'

 !     Push rejected, failed to compile Ruby app.

 !     Push failed
@vochicong
Copy link

It's the same here.

@TristanToye
Copy link

Just ran into this as well, reached out to slack channel for support.

@kennyadsl
Copy link
Member

I think the issue is with the buildpack we are using. At the moment we are using this custom one made to work with Solidus. I think we need to change this line and maybe rebase against the master upstream.

@vzqzac
Copy link
Contributor

vzqzac commented Aug 11, 2018

I started working on fixing this, I've rebased against master (heroku's master) in a fork I have, looks like the highlighted line @kennyadsl points is not the problem per se, after rebasing I'm getting

/app/tmp/buildpacks/5d51a38112e2190359fa255183c8bd4ece02a1addd9e6b285cccd67eb2ff9771a87dd90fe05d6ec64f7aca596e8c18c171474ac464cd56b347ece7c9ae3586ad/lib/language_pack/helpers/bundler_wrapper.rb:130:in `read': No such file or directory @ rb_sysopen - ./Gemfile.lock (Errno::ENOENT)

which should not happen since the Gemfile.lock is in the root path of the buildpack folder? I'm not familiar with the heroku buildpack flow/logic though, so I might be missing something.

@captproton
Copy link

captproton commented Aug 11, 2018

@vzqzac
Copy link
Contributor

vzqzac commented Aug 13, 2018

I got the button to work again after some dirty monkey patches on both this repo and the heroku-buildpack-solidus-demo one, you can try it here, this is for sure not a good solution, I'm still playing around to find a proper one and I have some suspicions on the solidus.rb file on the buildpack repo, but in case you want to check there's my work so far

Update: I've broken it again, since I'm still playing with it. Pretty much the change I made was actually committing the Gemfile.lock into solidus (🚫) since after rebasing with heroku's master (base of this fork) it complains about the Gemfile.lock not existing, I removed the --skip-bundle flag from the sandbox creation here and added the bundler gem but it is still not adding the file, of course what I did is not desired at all 😅 but the info might help someone trying to fix this too.

Update 2: I'm thinking that the problem is the .gitignore file in solidus, it includes the Gemfile.lock which makes sense since it's a gem, but might be screwing up the actual deploy? I think this would be better to be discussed on slack...

@rsipakov
Copy link

rsipakov commented Aug 13, 2018 via email

@kennyadsl
Copy link
Member

I have a fix ready for the heroku deploy button here: nebulab/heroku-buildpack-solidus-demo@518ca59

Heroku build is still failing for #2826, which is almost solved here. I'm going to fix the deploy button after the new ransack version is released.

@kennyadsl
Copy link
Member

I rebased our heroku buildpack repository against its upstream so we have the latest things.

I also made a small hack that disables yarn install, since we are not using it in the sample app and it was generating an issue with our solidus buildpack.

Closing this issue since now the deploy button works again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants