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

Running ridk install doesn't install msys2 #114

Closed
golyalpha opened this issue Jun 20, 2018 · 13 comments
Closed

Running ridk install doesn't install msys2 #114

golyalpha opened this issue Jun 20, 2018 · 13 comments

Comments

@golyalpha
Copy link

golyalpha commented Jun 20, 2018

What problems are you experiencing?

When installing Ruby 2.5.1 (ruby -v >ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]), and running ridk install, the install fails with

MSYS2 could not be found. Please run 'ridk install'
or download and install MSYS2 manually from https://msys2.github.io/

Steps to reproduce

  1. Install Ruby 2.5.1
  2. run ridk install
  3. press enter or type 1 and press enter

What's the output from ridk version?

---
ruby:
  path: C:/Ruby25-x64
  version: 2.5.1
  platform: x64-mingw32
ruby_installer:
  package_version: 2.5.1-1
  git_commit: 71c9f4e
sh: GNU bash, version 4.4.19(2)-release (x86_64-pc-msys)
os: Microsoft Windows [Version 10.0.17134.48]

Current solution is to, of course, install MSYS2 manually, but I feel that that's something ridk install should take care of by itself.

@golyalpha golyalpha changed the title Running ridk install doesn't instal msys2 Running ridk install doesn't install msys2 Jun 20, 2018
@larskanis
Copy link
Member

Step 1 should download an run the MSYS2-installer exe file. ridk version shows that you already have a bash installed: sh: GNU bash, version 4.4.19(2)-release (x86_64-pc-msys). Possibly they interfere each other. Can you please post the full output of ridk install?

@golyalpha
Copy link
Author

That's because I ran it for this issue after I installed MSYS2

@larskanis
Copy link
Member

If you just want a working ruby installation, it's the easiest option, to download the Ruby+Devkit flavor and install it into your current Ruby install directory. This will add a separate MSYS2 directory inside C:/Ruby25-x64.

You could also re-use an already present MSYS2 installation, by using one of the options described in #75 . However in this case you still have to run ridk install 3 at least, in order to get compiler and other required tools on your system.

@golyalpha
Copy link
Author

I never had MSYS2 or Ruby on my system. What I had to do is install Ruby and MSYS2 through their installers and then run ridk install to finish MSYS2's setup for Ruby.

@golyalpha
Copy link
Author

My point being, ridk install is responsible for (among other things) installing MSYS2, at which it fails.

@larskanis
Copy link
Member

What a pity, but again: Can you please post the full output of ridk install?

@golyalpha
Copy link
Author

Working on it, just have to uninstall msys2 first.

@golyalpha
Copy link
Author

> ridk install
 _____       _           _____           _        _ _         ___
|  __ \     | |         |_   _|         | |      | | |       |__ \
| |__) |   _| |__  _   _  | |  _ __  ___| |_ __ _| | | ___ _ __ ) |
|  _  / | | | '_ \| | | | | | | '_ \/ __| __/ _` | | |/ _ \ '__/ /
| | \ \ |_| | |_) | |_| |_| |_| | | \__ \ || (_| | | |  __/ | / /_
|_|  \_\__,_|_.__/ \__, |_____|_| |_|___/\__\__,_|_|_|\___|_||____|
                    __/ |           _
                   |___/          _|_ _  __   | | o __  _| _     _
                                   | (_) |    |^| | | |(_|(_)\^/_>

   1 - MSYS2 base installation
   2 - MSYS2 system update (optional)
   3 - MSYS2 and MINGW development toolchain

Which components shall be installed? If unsure press ENTER [1,2,3]

MSYS2 could not be found. Please run 'ridk install'
or download and install MSYS2 manually from https://msys2.github.io/

Would it be possible that it's conflicting with having WSL installed?

@larskanis
Copy link
Member

Would it be possible that it's conflicting with having WSL installed?

I don't think so. But I found a constellation where I can partly reproduce your error. I'll dig deeper - stay tuned!

@larskanis
Copy link
Member

larskanis commented Jun 20, 2018

This is a bug introduced two months ago. Thank you for highlithing this!

Can you please change the file

C:\Ruby25-x64\lib\ruby\site_ruby\2.5.0\ruby_installer\runtime\components\01_msys2.rb

Line 11 to

if msys.with_msys_apps_enabled(if_no_msys: :raise) { run_verbose("sh", "-lc", "true") }

and run ridk install again? This should fix the issue.

@golyalpha
Copy link
Author

Can confirm successful fix.

@larskanis
Copy link
Member

Ok thanks. I'll release 2.5.1-2 and 2.4.4-2 today or tomorrow with this fix included.

@DryreL
Copy link

DryreL commented Sep 14, 2021


| __ \ | | |_ | | | | | | |_
| |) | | | _ _ | | _ __ | | __ | | | ___ _ __ ) |
| _ / | | | '
| | | | | | | '
/ __| / _` | | |/ _ \ '/ /
| | \ \ |
| | |) | || || || | | __ \ || (| | | | _/ | / /
|
| __,|_.
/ __, ||| ||/__,||_|__||||
/ | _
|
/ | _ __ | | o __ | _ _
| (
) | |^| | | |(
|(
)^/_>

1 - MSYS2 base installation
2 - MSYS2 system update (optional)
3 - MSYS2 and MINGW development toolchain

Which components shall be installed? If unsure press ENTER [1,3] 1

sh -lc true

Creating /dev/mqueue directory failed.
POSIX message queues will not work

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

3 participants