Project

General

Profile

Problem installing required gems

Added by Rene Goral over 1 year ago

I'm trying installing Redmine following mostly the instructions on https://www.veuhoff.net/redmine-ticketsystem-installation-und-konfiguration-fuer-linux-ubuntu-22-04/.
Now I have a problem installing the required gems which I didn't have earlier. After running

sudo gem install bundler

I change dir to the redmine root dir and run
bundle config set --local --path vendor/bundle --without development test

If I now run bundle install I get the error
Retrying download gem from https://rubygems.org/ due to error (2/4): Bundler::PermissionError There was an error while trying to write to `/var/lib/gems/3.0.0/cache/builder-3.2.4.gem`. It is likely that you need to grant write permissions for that path.

for a lot of gems. Some are installed correctly. But in the end it shows
Bundler::PermissionError: There was an error while trying to write to `/var/lib/gems/3.0.0/cache/concurrent-ruby-1.2.2.gem`. It is likely that you need to grant write permissions for that path.
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/shared_helpers.rb:105:in `rescue in filesystem_access'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/shared_helpers.rb:102:in `filesystem_access'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/rubygems_integration.rb:483:in `block in download_gem'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/retry.rb:40:in `run'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/retry.rb:30:in `attempt'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/rubygems_integration.rb:474:in `download_gem'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:481:in `download_gem'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:443:in `fetch_gem'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:427:in `fetch_gem_if_possible'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:156:in `install'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/installer/gem_installer.rb:54:in `install'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/installer/parallel_installer.rb:156:in `do_install'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/installer/parallel_installer.rb:147:in `block in worker_pool'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/worker.rb:62:in `apply_func'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/worker.rb:57:in `block in process_queue'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/worker.rb:54:in `loop'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/worker.rb:54:in `process_queue'
  /var/lib/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'

An error occurred while installing concurrent-ruby (1.2.2), and Bundler cannot continue.

In Gemfile:
  rails was resolved to 6.1.7.2, which depends on
    actioncable was resolved to 6.1.7.2, which depends on
      actionpack was resolved to 6.1.7.2, which depends on
        actionview was resolved to 6.1.7.2, which depends on
          rails-dom-testing was resolved to 2.0.3, which depends on
            activesupport was resolved to 6.1.7.2, which depends on
              i18n was resolved to 1.10.0, which depends on
                concurrent-ruby

During previous installations I didn't have that problem and I was asked for sudo password if necessary. Where is my mistake?


Replies (4)

RE: Problem installing required gems - Added by C S over 1 year ago

Hallo,
sieht nach einem Rechteproblem aus ;)

... is likely that you need to grant write permissions for that path...

Du musst die Schreibrechte anpassen...wie das mit Linux funktioniert, darfst Du mich aber nicht fragen...ich benutze Redmine via Docker

RE: Problem installing required gems - Added by Rene Goral over 1 year ago

Es ist in der Tat ein Rechteproblem. Ich ann es mir aber gerade noch nicht erklären. Damit vielleicht jemand noch hinter meinen Fehler kommt, mach ich mal auf Englisch weiter:
Meanwhile I kind of solved that problem by running "sudo gem uninstall bundler". I got a message that version 2.2.24 was uninstalled and now 2.2.22 is used. After that it accepted the path vendor/bundle and is now running without sudo privileges.

RE: Problem installing required gems - Added by Rene Goral over 1 year ago

I started from cratch and followed the instructions on https://redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_50x_on_Ubuntu_2004_with_Apache2

I once again ran into the same problem. Once again I uninstalled bundler by using

sudo gem uninstall bundler

And again I got the result:
Gem bundler-2.2.22 cannot be uninstalled because it is a default gem
Successfully uninstalled bundler-2.4.12

After that I used

bundle config set --path ‘vendor/bundle’
bundle config set --local without 'development test'

in redmine root dir and it kindly asked for the sudo password as needed.

RE: Problem installing required gems - Added by Liane Hampe over 1 year ago

Hi Rene,

Your problem is very typical when installing a Ruby on Rails app the first time.

Ruby has neither to be run under sudo nor root. That is very important!

When you will install Redmine with an unprivileged user then it will work for sure.

Let me know when you need further assistance.

Best Regards
Liane

    (1-4/4)