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

bundle install - Errno::EACCES: Permission denied @ rb_sysopen - /usr/share/gems/specifications/websocket-extensions-0.1.5.gemspec #7586

Closed
constant1n0 opened this issue Apr 17, 2024 · 1 comment · Fixed by #7603
Labels

Comments

@constant1n0
Copy link

--- ERROR REPORT TEMPLATE -------------------------------------------------------

Errno::EACCES: Permission denied @ rb_sysopen - /usr/share/gems/specifications/websocket-extensions-0.1.5.gemspec
  /usr/share/rubygems/rubygems.rb:783:in `initialize'
  /usr/share/rubygems/rubygems.rb:783:in `open'
  /usr/share/rubygems/rubygems.rb:783:in `open_file'
  /usr/share/rubygems/rubygems/stub_specification.rb:113:in `data'
  /usr/share/rubygems/rubygems/stub_specification.rb:200:in `valid?'
  /usr/share/rubygems/rubygems/specification.rb:777:in `select'
  /usr/share/rubygems/rubygems/specification.rb:777:in `gemspec_stubs_in'
  /usr/share/rubygems/rubygems/specification.rb:792:in `block in map_stubs'
  /usr/share/rubygems/rubygems/specification.rb:789:in `each'
  /usr/share/rubygems/rubygems/specification.rb:789:in `flat_map'
  /usr/share/rubygems/rubygems/specification.rb:789:in `map_stubs'
  /usr/share/rubygems/rubygems/specification.rb:782:in `installed_stubs'
  /usr/share/rubygems/rubygems/specification.rb:847:in `stubs_for_pattern'
  /usr/share/rubygems/rubygems/specification.rb:836:in `stubs_for'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/rubygems_gem_installer.rb:51:in `generate_plugins'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/rubygems_gem_installer.rb:33:in `install'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/source/rubygems.rb:204:in `install'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/installer/gem_installer.rb:54:in `install'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/worker.rb:62:in `apply_func'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/worker.rb:57:in `block in process_queue'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/worker.rb:54:in `loop'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/worker.rb:54:in `process_queue'
  /usr/share/gems/gems/bundler-2.3.7/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

Environment

Bundler       2.3.7
  Platforms   ruby, x86_64-linux
Ruby          3.1.2p20 (2022-04-12 revision 4491bb740a9506d76391ac44bb2fe6e483fec952) [x86_64-linux]
  Full Path   /usr/bin/ruby
  Config Dir  /etc
RubyGems      3.3.7
  Gem Home    /usr/share/gems
  Gem Path    /home/admin/.local/share/gem/ruby:/usr/share/gems:/usr/local/share/gems
  User Home   /home/admin
  User Path   /home/admin/.local/share/gem/ruby
  Bin Dir     /usr/bin
OpenSSL       
  Compiled    OpenSSL 3.0.1 14 Dec 2021
  Loaded      OpenSSL 3.0.7 1 Nov 2022
  Cert File   /etc/pki/tls/cert.pem
  Cert Dir    /etc/pki/tls/certs
Tools         
  Git         not installed
  RVM         not installed
  rbenv       not installed
  chruby      not installed

Bundler Build Metadata

Built At          2024-04-17
Git SHA           unknown
Released Version  false

Gemfile

Gemfile

source 'https://rubygems.org'

ruby '>= 2.7.0', '< 3.3.0'

gem 'rails', '6.1.7.7'
gem 'rouge', '~> 4.2.0'
gem 'request_store', '~> 1.5.0'
gem 'mini_mime', '~> 1.1.0'
gem "actionpack-xml_parser"
gem 'roadie-rails', '~> 3.1.0'
gem 'marcel'
gem 'mail', '~> 2.8.1'
gem 'nokogiri', '~> 1.15.2'
gem 'i18n', '~> 1.14.1'
gem 'rbpdf', '~> 1.21.3'
gem 'addressable'
gem 'rubyzip', '~> 2.3.0'

#  Ruby Standard Gems
gem 'csv', '~> 3.2.6'
gem 'net-imap', '~> 0.3.4'
gem 'net-pop', '~> 0.1.2'
gem 'net-smtp', '~> 0.3.3'
gem 'rexml', require: false if Gem.ruby_version >= Gem::Version.new('3.0')

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

# TOTP-based 2-factor authentication
gem 'rotp', '>= 5.0.0'
gem 'rqrcode'

# HTML pipeline and sanitization
gem "html-pipeline", "~> 2.13.2"
gem "sanitize", "~> 6.0"

# Optional gem for LDAP authentication
group :ldap do
  gem 'net-ldap', '~> 0.17.0'
end

# Optional gem for exporting the gantt to a PNG file
group :minimagick do
  gem 'mini_magick', '~> 4.12.0'
end

# Optional Markdown support
group :markdown do
  gem 'redcarpet', '~> 3.6.0'
end

# Optional CommonMark support, not for JRuby
group :common_mark do
  gem "commonmarker", '~> 0.23.8'
  gem 'deckar01-task_list', '2.3.2'
end

# Include database gems for the adapters found in the database
# configuration file
require 'erb'
require 'yaml'
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
  yaml_config = ERB.new(IO.read(database_file)).result
  database_config = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(yaml_config) : YAML.load(yaml_config)
  adapters = database_config.values.filter_map {|c| c['adapter']}.uniq
  if adapters.any?
    adapters.each do |adapter|
      case adapter
      when 'mysql2'
gem "mysql2", "~> 0.5.0", :platforms => [:mri, :mingw, :x64_mingw]
gem "with_advisory_lock"
      when /postgresql/
gem 'pg', '~> 1.5.3', :platforms => [:mri, :mingw, :x64_mingw]
      when /sqlite3/
gem 'sqlite3', '~> 1.6.0', :platforms => [:mri, :mingw, :x64_mingw]
      when /sqlserver/
gem "tiny_tds", "~> 2.1.2", :platforms => [:mri, :mingw, :x64_mingw]
gem "activerecord-sqlserver-adapter", "~> 6.1.0", :platforms => [:mri, :mingw, :x64_mingw]
      else
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
      end
    end
  else
    warn("No adapter found in config/database.yml, please configure it first")
  end
else
  warn("Please configure your config/database.yml first")
end

group :development do
  gem 'listen', '~> 3.3'
  gem "yard"
end

group :test do
  gem "rails-dom-testing"
  gem 'mocha', '>= 2.0.1'
  gem 'simplecov', '~> 0.22.0', :require => false
  gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
  # For running system tests
  gem 'puma'
  gem "capybara", ">= 3.39"
  if Gem.ruby_version < Gem::Version.new('3.0')
    gem "selenium-webdriver", "<= 4.9.0"
    gem "webdrivers", require: false
  else
    gem "selenium-webdriver", ">= 4.11.0"
  end
  # RuboCop
  gem 'rubocop', '~> 1.57.0', require: false
  gem 'rubocop-performance', '~> 1.19.0', require: false
  gem 'rubocop-rails', '~> 2.22.1', require: false
end

local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exist?(local_gemfile)
  eval_gemfile local_gemfile
end

# Load plugins' Gemfiles
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
  eval_gemfile file
end

Gemfile.lock

<No /SERVICIOS/redmine-5.1.2/Gemfile.lock found>

--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

@constant1n0 constant1n0 changed the title bundle install ERROR under Redhat 9.2 ruby 3.1 postgres 15 bundle install ERROR Apr 17, 2024
@constant1n0 constant1n0 changed the title bundle install ERROR bundle install - Errno::EACCES: Permission denied @ rb_sysopen - /usr/share/gems/specifications/websocket-extensions-0.1.5.gemspec Apr 18, 2024
@deivid-rodriguez
Copy link
Member

Thanks for the report.

The problem is that bundle install needs to read the file needs to read the file /usr/share/gems/specifications/websocket-extensions-0.1.5.gemspec, but that file is unreadable. Giving that file proper read permissions should fix the problem.

Bundler should not be printing the bug report template in this case though, since this is a user error. I'm fixing that issue at #7603, so that a proper user error is printed.

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

Successfully merging a pull request may close this issue.

2 participants