GithubHelp home page GithubHelp logo

Comments (10)

pvalena avatar pvalena commented on August 15, 2024

Please paste logs with error message and any configs (f.e. Gemfile, Gemfile.lock) you've used.

from s2i-ruby-container.

pvalena avatar pvalena commented on August 15, 2024

(Or link to repo instead of pasting.)

from s2i-ruby-container.

chargio avatar chargio commented on August 15, 2024

Use this gemfile and it will fail with an error message about not being able to install cmake:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.4'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
# gem 'rack-cors'

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  gem 'coveralls', require: false
  gem 'database_cleaner'
  gem 'factory_bot_rails'
  gem 'faker'
  gem 'rspec-rails', '~> 3.6'
end

group :development do
  gem 'listen', '>= 3.0.5', '< 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
  gem 'rubocop', :require => false
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]


#
# Devise
#
gem 'devise', '~> 4.0'

gem 'octokit', '~> 4.0'
gem 'omniauth'
gem 'omniauth-github'
gem 'github-markup'
gem 'commonmarker' # Needed to render markdown github style
gem 'json-schema'

from s2i-ruby-container.

pvalena avatar pvalena commented on August 15, 2024

Do you have any minimal reproducer?
I can see multiple redundant dependencies (mingw for windows, jruby), which can cause your issue.

Also please supply the corresponding log and/or error message.

from s2i-ruby-container.

chargio avatar chargio commented on August 15, 2024

Just copy rails-ex and add commonmarker to the Gemfile.... It fails on build.

Example:

Cloning "https://github.com/miq-consumption/manageiq-galaxy.git" ...
	Commit:	65c9bd99c50e236c5f875b221df150fad0ce4791 (Merge pull request #10 from chargio/adding_tiddle)
	Author:	Sergio Ocón <sergio.ocon@redhat.com>
	Date:	Thu Nov 30 12:43:50 2017 +0100
---> Installing application source ...
---> Building your Ruby application from source ...
---> Running 'bundle install --deployment --without development:test' ...
Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.15.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Installing rake 12.3.0
Installing concurrent-ruby 1.0.5
Installing minitest 5.10.3
Installing thread_safe 0.3.6
Installing builder 3.2.3
Installing erubi 1.7.0
Installing mini_portile2 2.3.0
Installing crass 1.0.3
Installing rack 2.0.3
Installing nio4r 2.1.0 with native extensions
Installing websocket-extensions 0.1.3
Installing mini_mime 1.0.0
Installing arel 8.0.0
Installing public_suffix 3.0.1
Installing bcrypt 3.1.11 with native extensions
Installing orm_adapter 0.5.0
Installing method_source 0.9.0
Installing thor 0.19.4
Installing multipart-post 2.0.0
Installing github-markup 1.6.2
Installing pg 0.21.0 with native extensions
Installing puma 3.11.0 with native extensions
Installing rack-cors 1.0.2
Using bundler 1.13.7
Installing i18n 0.9.1
Installing tzinfo 1.2.4
Installing nokogiri 1.8.1 with native extensions
Installing rack-test 0.8.2
Installing warden 1.2.7
Installing sprockets 3.7.1
Installing websocket-driver 0.6.5 with native extensions
Installing mail 2.7.0
Installing addressable 2.5.2
Installing faraday 0.13.1
Installing ruby-enum 0.7.1
Installing activesupport 5.1.4
Installing loofah 2.1.1
Installing json-schema 2.8.0
Installing sawyer 0.8.1
Installing commonmarker 0.17.6 with native extensions
Installing rails-dom-testing 2.0.3
Installing globalid 0.4.1
Installing activemodel 5.1.4
Installing rails-html-sanitizer 1.0.3
Installing octokit 4.7.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/opt/app-root/src/bundle/ruby/2.4.0/gems/commonmarker-0.17.6/ext/commonmarker
/opt/rh/rh-ruby24/root/usr/bin/ruby -r ./siteconf20171130-16-n7x04s.rb
extconf.rb
checking for cmake... no
[ERROR]: cmake is required and not installed. Get it here: http://www.cmake.org/
*** 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}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/rh/rh-ruby24/root/usr/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/opt/app-root/src/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/commonmarker-0.17.6/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/opt/app-root/src/bundle/ruby/2.4.0/gems/commonmarker-0.17.6 for inspection.
Results logged to
/opt/app-root/src/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/commonmarker-0.17.6/gem_make.out
An error occurred while installing commonmarker (0.17.6), and Bundler cannot
continue.
Make sure that `gem install commonmarker -v '0.17.6'` succeeds before bundling.

from s2i-ruby-container.

pvalena avatar pvalena commented on August 15, 2024

I can confirm this is still the case. @hhorak do we want to add cmake?

$ podman run --rm -ti "registry.access.redhat.com/ubi8/ruby-${x}" /usr/bin/bash
bash-4.4$ cmake
bash: cmake: command not found
bash-4.4$ dnf install cmake
Not root, Subscription Management repositories not updated

This system is not registered with an entitlement server. You can use subscription-manager to register.

Error: This command has to be run with superuser privileges (under the root user on most systems).

from s2i-ruby-container.

pkubatrh avatar pkubatrh commented on August 15, 2024

cmake is available in UBI repositories so you can build your own layer on top of RH provided images if you need it for your application.
So I guess the question becomes - do we want to add it to the ruby images by default? Is it a necessary dependency for enough Ruby applications to justify the size increase?

from s2i-ruby-container.

phracek avatar phracek commented on August 15, 2024

@chargio Can you please have a look on the last comments? Does it make sense to you? Can you please answer on them?
What about to create a pull request? Thanks.

from s2i-ruby-container.

chargio avatar chargio commented on August 15, 2024

I haven't used it recently so I am afraid I can't help

from s2i-ruby-container.

chargio avatar chargio commented on August 15, 2024

But some libraries require compilation so yes, an usable ruby env needs cmake

from s2i-ruby-container.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.