Giter Site home page Giter Site logo

Comments (9)

tajmone avatar tajmone commented on July 24, 2024

I realized that this is an issue relate to the new Ruby Install changes:

https://github.com/oneclick/rubyinstaller2/wiki/FAQ#user-content-choco-install

Seems that I'll have to install MSYS2 one way or the other. What got me stuck here is that there are 3 options to the ridk install command mentioned in the gem update error, but couldn't work out which ones to go for.

Anyhow, I thought worth mentioning the problem for other users like me, who update Ruby via the Chocolatey package might suddenly stumble upon this new problem.

from bigdecimal.

tajmone avatar tajmone commented on July 24, 2024

Since I brought up the issue I might as well post the solution to the problem...

Assuming you have installed Ruby via Chocolatey, just install also the MSYS2 Chocolatey package. Once it's done, open the CMD:

ridk install 2 3
gem update

It's as simple as that (except that maybe you didn't want to install MSYS2 in the first place, but with the newer Ruby installer that's the way it so, tuff luck).

from bigdecimal.

mrkn avatar mrkn commented on July 24, 2024

@tajmone I'm sorry, I couldn't understand what should I do for this issue because I don't have enough knowledge of Windows environment. Would you please describe it?

from bigdecimal.

tajmone avatar tajmone commented on July 24, 2024

Hi @mrkn ! As I said, it's really a problem linked to Ruby v2.6 update, which changed the way gems are updated. But since I was getting the error only for the bigdecimal gem I thought it was specific to the gem.

Ultimately, I though to post the solution to the problem since other users might be experiencing the same issue.

Basically, Ruby installer for Windows now requires MSYS2 to be present on the system to update some gems, which wasn't required with Ruby <2.6, hence the error message.

The steps I mentioned in the solution, above, solve the problem (for all gems).

Possibly, in the future any problems in updating this gem will be tied to MSYS2, as using the ridk install 2 3 command might be required before performing gem update. This new way of updating gems complicates a bit things for Windows users.

Probably this issue should be closed, but hopefully it might be of some help as a reference to Windows specific problems in updating the gem.

from bigdecimal.

mrkn avatar mrkn commented on July 24, 2024

@tajmone Thank you for the explanation.
I'll write about ridk install 2 3 command in README. Is it enough for Windows users?

from bigdecimal.

kou avatar kou commented on July 24, 2024

It's needed only for Windows users who install Ruby by Chokolatey. Windows users who install Ruby by RubyInstaller for Windows directly don't need to anything. Because https://rubyinstaller.org/downloads/ recommends that normal users install Ruby with devkit.

I have no data but I think that direct RubyInstaller users are majority.

I think that putting a link to https://chocolatey.org/packages/msys2 is better because the page describes ridk install 2 3 and more.

from bigdecimal.

tajmone avatar tajmone commented on July 24, 2024

Thanks for the clarification @kou, this point wasn't clear to me although I spent over an hour jumping from the various docs of Ruby Installer and the Chocolatey package.

This whole situation made me unsure about potential MSYS2 issues and wether installing it manually, via Choco, using ridk, etc., could create duplicates or introduce conflicts.

I have no data but I think that direct RubyInstaller users are majority.

I have no clue either, by the Ruby Chocolatey package mentions over 684,986 download, so it's definitely quite popular too.

I'll write about ridk install 2 3 command in README. Is it enough for Windows users?

Only if MSYS2 is already on the system one way or another โ€” via Ruby + Dev Kit, installed manually or via Chocolatei, or installed via ridk install 1 for ridk also installs MSYS2 from scratch:

D:\>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]

I think that if someone has installed Ruby via Chocolatey he/she should also install MSYS2 via Choco (and viceversa) for both are desgined with options that would work well with other too. The Choco packages for Ruby and MSYS integrate well with each other:

Ruby integration

This package can be used with ruby package to provide native building environment for gems.

  • The ruby installer comes with ridk function which offers interactive GUI installation wizard of msys2 and hence can't be used unattended (ridk install 1).
  • Its system update is the same as initialization done with this package (ridk install 2).
  • Ruby installer offers unattended setup of MSYS2 and MINGW development toolchain (ridk install 3).

You can also just install the msys2 package without system update and use ridk afterwards:

cinst ruby                        # install ruby
cinst msys2 --params "/NoUpdate"  # install msys2 without system update
Update-SessionEnvironment         # refresh environment vars
ridk install 2 3                  # use ruby's ridk to update the system and install development toolchain

from bigdecimal.

nobu avatar nobu commented on July 24, 2024

Does this happen still?

This isnโ€™t a problem of bigdecimal, but rather a problem of RubyInstaller and/or Chocolatey, which affects other extension library gems. Should be discussed there.

from bigdecimal.

tajmone avatar tajmone commented on July 24, 2024

Does this happen still?

Never happened again after I filed this issue.

from bigdecimal.

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.