I want to try gin theme locally and I installed it with composer command 

composer require drupal/gin_toolbar:^1.0@rc drupal/gin:^3.0@rc

I attach the S.S. of the error that I get back
I did some research but I didn't understand how to do the installation
 

Comments

jaypan’s picture

Looks on these pages like RC is supposed to be capitalized:

https://www.drupal.org/project/gin

https://www.drupal.org/project/gin_toolbar

Contact me to contract me for D7 -> D10/11 migrations.

Gae58’s picture

Tried first one capital RC then the other. Then both but nothing to do.
It always reports the same error

jaypan’s picture

Now that I look at the error message, it says you're trying to install a beta version, but the command you showed in this thread is for a RC. Something isn't matching.

Contact me to contract me for D7 -> D10/11 migrations.

Gae58’s picture

Jaypan I can't tell you. I read from gin's page that if there are problems with the installation I can do the installation with the code I posted

gisle’s picture

I don't think capitalization matter. I am able to install both the Gin Toolbar and the Gin Admin Theme with the command reproduced in the the question. However, the observation that something isn't matching is right.

The command reproduced in the support question, the OP tells composer to install version 3.0@rc of the Gin Admin Theme, but the error message reproduced in the S.S. complains about version 3.0@beta of the Gin Admin Theme not meeting the requirements. So my guess is that the OP just mistyped and required the wrong version.

- gisle

Gae58’s picture

Hi gisle, thanks for the clarification, could you tell me what I am doing wrong ?
The only line I write for the installation via composer is
composer require drupal/gin_toolbar:^1.0@rc drupal/gin:^3.0@rc
which is the one on the module page
You wrote that you can safely install both the theme and the toolbar.
Did you use a single line or did you install the theme first and then the toolbar ?
The version of Drupal I use is 9.5 with php 8.1.12
Do you have to same version ?

gisle’s picture

I tested it with a single line composer command – exactly the same single line you reproduce in your question. However, that is not the command suggested on the module page, but I see nothing wrong with it. Splitting the download over two lines should work as well, and should simplify debugging.

What does not make sense, as first pointed out by Jaypan, is the error message that you show in the S.S. There is no way that that this command line should result in that error message.

My environment is Ububtu 22.04 LTS, PHP 8.1.7 and Drupal 10.0.0, but I don't think that's significant.

- gisle

Gae58’s picture

I tried single installation with this command
composer require 'drupal/gin:^3.0'
and it returns this error
S.S.
I'll try to post the problem 
I think the problem is locally and not in production
Thanks for the answers

gisle’s picture

The error message in the S.S. tells that you require a version of the Gin Admin Theme that does not exist (i.e. stable 3.0).

The command to require the release candidate (which exists) it is this:

composer require 'drupal/gin:^3.0@RC'

- gisle

Gae58’s picture

Yes I had given it a try. 
Also ran your command but the result does not change

gisle’s picture

No need for a screenshot. Just copypaste the text of the error you get.

FWIIW, this is what I get (splitting the requirements over two lines).

$ composer require 'drupal/gin_toolbar:^1.0@RC'
./composer.json has been updated
Running composer update drupal/gin_toolbar
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking drupal/gin_toolbar (1.0.0-rc1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing drupal/gin_toolbar (1.0.0-rc1): Extracting archive
Generating autoload files
43 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found

$ composer require 'drupal/gin:^3.0@RC'
./composer.json has been updated
Running composer update drupal/gin
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking drupal/gin (3.0.0-rc1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing drupal/gin (3.0.0-rc1): Extracting archive
Generating autoload files
44 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found

Please note that the Gin Admin Theme depends on the Gin Toolbar, but the dependecy is undeclared. This means that to install Gin Admin Theme with composer, you need to first require Gin Toolbar before you shall be able to require the Gin Admin Theme.

Drupal is actually capable of sorting out such a dependency itself, but for some reason the theme's dependency on "drupal:gin_toolbar" is commented out in the theme's gin.info.yml. To me, that just look weird. It makes requiring this theme a bit error prone, but I am not going to spend time trying to figure out why the theme's maintainers did this..

- gisle

Gae58’s picture

Sorry I post the S.S. because, locally, it won't let me copy the error lines
I tried installing gin toolbar first but the result doesn't change.
In production I made another installation and I can install gin 
It is on the local installation that the error comes back to me

gisle’s picture

If the error is actually this (reproduced verbatim from your S.S.):

Problem 1
   Root composer.json requires drupal/gin 3.0, found …

then your composer command requires a stable version of Gin Admin Theme that does not exist – producing the error. Make sure you require the right version.

- gisle

Gae58’s picture

Thank you, I post the error to the person who wrote the paper