gem, RubyGems, is a package manager for Ruby. It seems that it is not installed on your computer, or not available inside your $PATH.

First, try to execute which gem to see whether you can access it or not. Then,

  • If you previously installed gem, you probably have to modify $PATH to add the package manager's executable location.

  • If you did not, you need to. On Windows, your best option is to install Cygwin.

Answer from Thibaud Colas on Stack Overflow
🌐
Moncef Belyamani
moncefbelyamani.com › troubleshooting-command-not-found-in-the-terminal
How to fix "command not found" after installing gems
March 17, 2023 - When you install new programs, such as Ruby gems like Bundler, Jekyll, or Rails, they might get installed in a location that is not already included in the PATH. If you don’t add this new location to the PATH, the computer won’t know to look for it there, which is why you’ll get “command not found”.
🌐
Medium
medium.com › @andreahanna › i-got-a-gem-is-not-recognized-error-when-i-ran-the-command-in-cmd-a4d9d1bcf0c2
I got a “gem is not recognized” error when I ran the command in CMd. | by Andrea Hanna | Medium
March 12, 2018 - Found the solution and thought I should post it here as well: “ When you install Ruby using the Windows installer you need to check the “Add Ruby executables to your PATH” box.
🌐
Ruby-Forum
ruby-forum.com › t › bash-gem-command-not-found › 210833
Bash: gem: command not found - Ruby - Ruby-Forum
September 21, 2018 - I have installed ruby with cygwin according to these inst: but at the last command: gem install sproutcore I this bash: gem: command not found help _:slight_smile:
🌐
RoseIndia
roseindia.net › answers › viewqa › linux › 33111-Command-gem-not-found-but-can-be-installed-with.html
Command 'gem' not found, but can be installed with
December 13, 2018 - This could... to build gem native extension. How to resolve this compilation issue? Thanks &nbsp · Hadoop command not found Hadoop command not found Hi, I am trying to put file with the command: hadoop fs -put test.txt /test/ But its saying hadoop command not found. How to resolve this? Thanks Hi, This error means that you have · R command not found Windows Solved: R command not found Windows After installing R Programming tool...
Top answer
1 of 8
151

To setup you Ruby development environment on Windows:

  1. Install Ruby via RubyInstaller: http://rubyinstaller.org/downloads/

  2. Check your ruby version: Start - Run - type in cmd to open a windows console

  3. Type in ruby -v

  4. You will get something like that: ruby 2.0.0p353 (2013-11-22) [i386-mingw32]

For Ruby 2.4 or later, run the extra installation at the end to install the DevelopmentKit. If you forgot to do that, run ridk install in your windows console to install it.

For earlier versions:

  1. Download and install DevelopmentKit from the same download page as Ruby Installer. Choose an ?exe file corresponding to your environment (32 bits or 64 bits and working with your version of Ruby).
  2. Follow the installation instructions for DevelopmentKit described at: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#installation-instructions. Adapt it for Windows.
  3. After installing DevelopmentKit you can install all needed gems by just running from the command prompt (windows console or terminal): gem install {gem name}. For example, to install rails, just run gem install rails.
2 of 8
85

I recommend you just use rubyinstaller

It is recommended by the official Ruby page - see https://www.ruby-lang.org/en/downloads/

Ways of Installing Ruby

We have several tools on each major platform to install Ruby:

  • On Linux/UNIX, you can use the package management system of your distribution or third-party tools (rbenv and RVM).
  • On OS X machines, you can use third-party tools (rbenv and RVM).
  • On Windows machines, you can use RubyInstaller.
🌐
RubyGems
guides.rubygems.org › command-reference
Command Reference - RubyGems Guides
--[no-]suggestions - Suggest alternates when gems are not found · --target-rbconfig [FILE] - rbconfig.rb for the deployment target platform · -l, --local - Restrict operations to the LOCAL domain · -r, --remote - Restrict operations to the REMOTE domain ... The update command will update your gems to the latest version.
🌐
SvennD
svennd.be › gem-command-not-found
gem: Command not found - SvennD
January 19, 2018 - gem install --version 1.15.4 bundler make: gem: Command not found make: *** [setup] Error 127 · This can be resolved by installing the package : yum -y install rubygems-devel · or for the Debian friends · apt-get install rubygems · Happy building 🙂 · Support · If you enjoyed this website, ...
Find elsewhere
🌐
GitHub
github.com › beefproject › beef › issues › 1996
./install: line 176: RUBY_VERSION: command not found [INFO] Updating rubygems... sudo: gem: command not found · Issue #1996 · beefproject/beef
October 4, 2020 - You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. ... ./install: line 176: RUBY_VERSION: command not found [INFO] Updating rubygems... sudo: gem: command not found#1996
Author   tanjhysj0
🌐
OpenStack
wiki.openstack.org › wiki › RubyGems
RubyGems - OpenStack
If the command is not found, then update your PATH variable accordingly. For example, you can update your .bashrc file with the following line: export PATH=$PATH:/var/lib/gems/1.8/bin · Download and install Ruby Installer for Windows.
🌐
GitHub
github.com › ruby › rubygems › issues › 1525
Gems installer for Windows does not support ruby path with spaces · Issue #1525 · ruby/rubygems
March 2, 2016 - It arises when the installation directory contains spaces: my installation directory is C:\Program Files\Ruby22. This is the error I get when trying to use a gem: C:\Windows\system32>sass --version '""C:\Program' is not recognized as an internal ...
Author   demurgos
🌐
CopyProgramming
copyprogramming.com › howto › gem-command-not-found
Ruby: Gem Command not found
May 24, 2023 - In case of Windows, the most suitable solution would be to get Cygwin installed. Ruby - Gem installed. Gem's command is not found, I installed the ruby-processing gem using: $ sudo gem install ruby-processing When I try to run ruby-processing's rp5 command, this is the output I …
🌐
GitHub
github.com › babun › babun › issues › 450
pact does not install ruby gem command · Issue #450 · babun/babun
September 17, 2015 - You switched accounts on another tab or window. Reload to refresh your session. ... Hi guys, I just installed ruby via pact but once finished the gem command are not available. Any idea where the spanner could jam?
Author   bertramn
🌐
GitHub
github.com › rubygems › bundler › issues › 5996
command not found · Issue #5996 · rubygems/bundler
September 1, 2017 - I need help trying to figure why I am getting the "command not found" error when I try to do: bundle exec middleman · This used to work, but I needed to reinstall bundler (probably after an OS upgrade) and since then it no longer works. "bundle check" does not report any errors. There is an executable script "middleman" in /Library/Ruby/Gems/2.0.0/gems/middleman-core-3.4.0/bin.
Author   cbfiddle
🌐
GitHub
gist.github.com › 5896131
Installing Native gems on windows · GitHub
Installing Native gems on windows. GitHub Gist: instantly share code, notes, and snippets.
🌐
GitHub
github.com › rubygems › rubygems › issues › 977
Native gem installation doesn't work on Windows with >= 2.4.0 · Issue #977 · rubygems/rubygems
July 18, 2014 - Trying to install a native gem on Windows doesn't work with RubyGems >= 2.4.0, Ruby 1.9.3-p547. DevKit is installed. As far as I can tell, this is related to b97ec2a C:\ruby-1.9.3-p547\bin> gem install json Temporarily enhancing PATH to ...
Author   blt04