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

docker-compose build : Gem::Ext::BuildError while installing ruby-debug-ide 0.6.0 or 0.6.1.beta2 #79

Open
whiterosetechnologies opened this issue Jul 2, 2016 · 4 comments

Comments

@whiterosetechnologies
Copy link

whiterosetechnologies commented Jul 2, 2016

Greetings;

I can run "gem install ruby-debug-ide -v '0.6.0' or -v '0.6.1.beta2' to completion, no problem.

When I run "docker-compose build" against my Gemfile that includes ruby-debug-ide (both cases, same result), I get a Gem::Ext::BuildError.

Have you seen this before?

Thanks for your help!
[email protected]

Please find below:

  1. Segment of build with error
  2. Gemfile
  3. Here is the portion of the build with the error:

Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Installing rake 11.2.2
Installing i18n 0.7.0
Using json 1.8.3
Installing minitest 5.9.0
Installing thread_safe 0.3.5
Installing builder 3.2.2
Installing erubis 2.7.0
Installing mini_portile2 2.1.0
Installing pkg-config 1.1.7
Installing rack 1.6.4
Installing mime-types-data 3.2016.0521
Installing arel 6.0.3
Installing debug_inspector 0.0.2 with native extensions
Installing coffee-script-source 1.10.0
Installing execjs 2.7.0
Installing thor 0.19.1
Installing concurrent-ruby 1.0.2
Installing debase-ruby_core_source 0.8.6
Installing multi_json 1.12.1
Installing pg 0.18.4 with native extensions
Using bundler 1.12.5
Installing sass 3.4.22
Installing tilt 2.0.5
Installing spring 1.7.1
Installing ruby-debug-ide 0.6.0 with native extensions

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

current directory: /var/lib/gems/2.3.0/gems/ruby-debug-ide-0.6.0/ext

/usr/bin/ruby2.3 mkrf_conf.rb
Installing base gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/debase-0.2.2.beta8/ext

/usr/bin/ruby2.3 -r ./siteconf20160702-401-8mnotr.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... 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/$(RUBY_BASE_NAME)2.3
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
/var/lib/gems/2.3.0/gems/debase-ruby_core_source-0.8.6/lib/debase/ruby_core_source.rb:70:in ruby_source_dir_version': undefined method[]' for nil:NilClass (NoMethodError)
from /var/lib/gems/2.3.0/gems/debase-ruby_core_source-0.8.6/lib/debase/ruby_core_source.rb:58:in block in deduce_packaged_source_dir' from /var/lib/gems/2.3.0/gems/debase-ruby_core_source-0.8.6/lib/debase/ruby_core_source.rb:58:inmap'
from /var/lib/gems/2.3.0/gems/debase-ruby_core_source-0.8.6/lib/debase/ruby_core_source.rb:58:in deduce_packaged_source_dir' from /var/lib/gems/2.3.0/gems/debase-ruby_core_source-0.8.6/lib/debase/ruby_core_source.rb:36:increate_makefile_with_core'
from extconf.rb:47:in `

'

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

/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta8/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/debase-0.2.2.beta8 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta8/gem_make.out
/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:92:in run' /usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:37:inblock in build'
/usr/lib/ruby/2.3.0/tempfile.rb:295:in open' /usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:20:inbuild'
/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:164:in block (2 levels) in build_extension' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:inchdir'
/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in block in build_extension' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:insynchronize'
/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in build_extension' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:201:inblock in build_extensions'
/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in each' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:inbuild_extensions'
/usr/lib/ruby/2.3.0/rubygems/installer.rb:742:in build_extensions' /usr/lib/ruby/2.3.0/rubygems/installer.rb:291:ininstall'
/usr/lib/ruby/2.3.0/rubygems/request_set.rb:167:in block in install' /usr/lib/ruby/2.3.0/rubygems/request_set.rb:151:ineach'
/usr/lib/ruby/2.3.0/rubygems/request_set.rb:151:in install' /usr/lib/ruby/2.3.0/rubygems/dependency_installer.rb:405:ininstall'
mkrf_conf.rb:35:in rescue in <main>' mkrf_conf.rb:28:in

'

rake failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/ruby-debug-ide-0.6.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ruby-debug-ide-0.6.0/gem_make.out
Installing rdoc 4.2.2
Installing tzinfo 1.2.2
Installing nokogiri 1.6.8 with native extensions
Installing rack-test 0.6.3
Installing mime-types 3.1
Installing binding_of_caller 0.7.2 with native extensions
Installing coffee-script 2.4.1
Installing uglifier 3.0.0
Installing sprockets 3.6.2
Installing debase 0.2.1 with native extensions

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

  1. Here is my Gemfile

source 'https://rubygems.org'
ruby '2.3.0'
gem 'rails', '4.2.6'
gem 'pg', '> 0.15'
gem 'sass-rails', '
> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '
> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc

group :development, :test do
gem 'ruby-debug-ide', '0.6.0'
gem 'debase'
end

group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
end

@whiterosetechnologies
Copy link
Author

whiterosetechnologies commented Jul 2, 2016

Also, Dockerfile:

FROM convox/rails

COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock
COPY vendor/cache /app/vendor/cache

RUN bundle --local --path vendor/bundle

COPY Rakefile /app/Rakefile
COPY config /app/config
COPY public /app/public
COPY app/assets /app/app/assets
RUN rake assets:precompile

COPY . /app

And docker-compose.yml file:

web:
build: .
labels:
- convox.port.443.protocol=tls
- convox.port.443.proxy=true
links:
- database
ports:
- 80:4000
- 443:4001

database:
image: convox/postgres
ports:
- 5432

@denofevil
Copy link
Member

Please try adding gem 'debase-ruby_core_source', '~> 0.9.1' to the Gemfile. Does it help?

@wollkind
Copy link

wollkind commented May 3, 2017

I'm having the exact same issue and debase-ruby_core_source isn't helping me. Did you ever solve this?

@JamesCarscadden
Copy link

I also had the same issue. For me the annoying part is that everything worked fine when using docker for windows and docker for mac, but not when using docker for linux (ubuntu). This led me to believe it was a docker issue rather than an issue with ruby-debug-ide. However after an afternoon of banging my head against this I've finally worked it out:

Removing ruby-debug-ide gem from my Gemfile (and then running docker-compose) made it clear that the problem was actually in the 'debase' gem, rather than ruby-debug-ide. Further, removing the 'debase' gem from my Gemfile and re-adding ruby-debug-ide allowed docker-compose to finish correctly.

Finally, re-adding 'debase' to the Gemfile like so (I didn't previously have the version specifier):

gem 'debase', '~>0.2.2.beta10', require: false

and then again running docker-compose, finally got everything working.

So: the problem appears to have been in 'debase-0.2.1' which is the default installed if you haven't specified a specific version in your Gemfile. Using debase-0.2.2.beta10 solved the problem for me.

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

4 participants