/bin/sh: Command not found - ruby

I am trying to install ruby via rvm on Windows by using the command
rvm install "ruby-2.6.5"
I get the following output (Below XXXX is my username and hence redacted it)
ruby-2.6.5 - #removing src/ruby-2.6.5..
Searching for binary rubies, this might take some time.
No binary rubies available for: mingw/unknown/x86_64/ruby-2.6.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Installing Ruby from source to: /c/Users/XXXX/.rvm/rubies/ruby-2.6.5, this may take a while depending on your cpu(s)...
ruby-2.6.5 - #downloading ruby-2.6.5, this may take a while depending on your connection...
ruby-2.6.5 - #extracting ruby-2.6.5 to /c/Users/XXXX/.rvm/src/ruby-2.6.5....|
ruby-2.6.5 - #configuring......................................................|
ruby-2.6.5 - #post-configuration..
ruby-2.6.5 - #compiling.
ruby-2.6.5 - #installing.
Error running '__rvm_make install',
please read /c/Users/XXXX/.rvm/log/1663339281_ruby-2.6.5/install.log
There has been an error while running make install. Halting the installation.
I tried updating the PATH variable to have the path where sh.exe is present but still does not work.
In the make.log, install.log, and configure.log I see the below error
make: /bin/sh: Command not found
As per the error, I think it is unable to process the make command because it is unable to find the sh.exe

Related

rvm not installing ruby-2.2; Error running '__rvm_make -j4'

When I try to download Cocoapods, it says:
XXXX: ~ XXX$ sudo gem install cocoapods
Password:XX
ERROR: Error install cocoapods:
minitest requires Ruby version ~> 2.2.
Then I try every way to install ruby but it gives me this:
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.11/x86_64/ruby-2.2.5.tar.bz2
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl#1.1/cert.pem' is already up to date.
Requirements installation successful.
ruby-2.2.5 - #configure
ruby-2.2.5 - #download
ruby-2.2.5 - #validate archive
ruby-2.2.5 - #extract
ruby-2.2.5 - #validate binary
Libraries missing for ruby-2.2.5: __rvm_ls. Refer to your system manual for installing libraries
Mounting remote ruby failed with status 10, trying to compile.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl#1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/vishaljayakumar/.rvm/rubies/ruby-2.2.5, this may take a while depending on your cpu(s)...
ruby-2.2.5 - #downloading ruby-2.2.5, this may take a while depending on your connection...
ruby-2.2.5 - #extracting ruby-2.2.5 to /Users/vishaljayakumar/.rvm/src/ruby-2.2.5.....
ruby-2.2.5 - #applying patch /Users/vishaljayakumar/.rvm/patches/ruby/2.2.5/fix_installing_bundled_gems.patch.
ruby-2.2.5 - #applying patch /Users/vishaljayakumar/.rvm/patches/ruby/2.2.5/openssl3.patch.
ruby-2.2.5 - #configuring......................................................-
ruby-2.2.5 - #post-configuration.
ruby-2.2.5 - #compiling........................................................|
Error running '__rvm_make -j4',
please read /Users/vishaljayakumar/.rvm/log/1581558007_ruby-2.2.5/make.log
There has been an error while running make. Halting the installation.
What do I do?
I have done literally every solution here and it doesn't work:
Github Error Page
Let me just name some of them just for you to see.
rvm get head
rvm mount -r https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.8.tar.bz2
rvm get stable; rvm reload; rvm install "ruby-2.2.X"
anything to do with openssl(I have no idea what it is)
rvm install ruby-2.6.5 --with-openssl-dir='{directory of openssl}
sudo xcode-select -s /Applications/Xcode.app
rvm install 2.6.4
brew install homebrew/portable-ruby/portable-openssl
rvm reinstall ruby-2.3.1 --with-openssl-dir=/usr/local/opt/portable-openssl/
Please give me a solution that is not in here(or one of the above).
I am a little desperate as I have wasted a lot of time on these commands!
I am free to any answers or comments!!!!!

Issue installing Ruby 2.5.0 on macos

I'm trying to work on a new app which I cloned from a repository, so I enter in the file and got this:
RVM used your Gemfile for selecting Ruby,
it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /Users/cathleenhenninot/Desktop/omnimeta-schema-manager/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
Required ruby-2.5.0 is not installed. To install do: 'rvm install "ruby-2.5.0"'
ok, so I'm actually in ruby 2.5.1, should I install the ruby 2.5.0? Is it an obligation to work on the same version as the repository?
I tried and run rvm install "ruby-2.5.0"
and i got this:
Found old RVM 1.29.7-next - updating.
Downloading https://get.rvm.io
No GPG software exists to validate rvm-installer, skipping.
Downloading https://github.com/rvm/rvm/archive/master.tar.gz
Upgrading the RVM installation in /Users/cathleenhenninot/.rvm/
RVM PATH line found in /Users/cathleenhenninot/.mkshrc /Users/cathleenhenninot/.profile /Users/cathleenhenninot/.bashrc.
RVM PATH line not found for Zsh, rerun this command with '--auto-dotfiles' flag to fix it.
RVM sourcing line found in /Users/cathleenhenninot/.profile /Users/cathleenhenninot/.bash_profile /Users/cathleenhenninot/.zlogin.
Upgrade of RVM in /Users/cathleenhenninot/.rvm/ is complete.
Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.
👉 Donate: https://opencollective.com/rvm/donate
RVM reloaded!
ruby-2.5.0 - #removing src/ruby-2.5.0 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.5.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl#1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/cathleenhenninot/.rvm/rubies/ruby-2.5.0, this may take a while depending on your cpu(s)...
ruby-2.5.0 - #downloading ruby-2.5.0, this may take a while depending on your connection...
ruby-2.5.0 - #extracting ruby-2.5.0 to /Users/cathleenhenninot/.rvm/src/ruby-2.5.0 - please wait
ruby-2.5.0 - #applying patch /Users/cathleenhenninot/.rvm/patches/ruby/2.5.0/prelude_gcc_diagnostic.patch - please wait
ruby-2.5.0 - #applying patch /Users/cathleenhenninot/.rvm/patches/ruby/2.5.0/libressl_2_7.patch - please wait
ruby-2.5.0 - #configuring - please wait
Error running './configure --prefix=/Users/cathleenhenninot/.rvm/rubies/ruby-2.5.0 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/libksba:/usr/local/opt/readline:/usr/local/opt/zlib:/usr/local/opt/openssl#1.1 --disable-install-doc --enable-shared',
please read /Users/cathleenhenninot/.rvm/log/1552667484_ruby-2.5.0/configure.log
There has been an error while running configure. Halting the installation.
An error stop the installation, how do I finish the installation of ruby 2.5.0? Any help would be great! Thanks :)

Libraries missing for ruby 2.3.1

currently trying to install Ruby 2.3.1 using rvm on my terminal(macOS Sierra) but ran into this error
Libraries missing for ruby-2.3.1:
/Users/travis/.rvm/rubies/ruby-2.3.1/lib/libruby.2.3.0.dylib,/usr/local/opt/gdbm/lib/libgdbm.4.dylib. Refer to your system manual for installing libraries
This error is similar to another question on stack overflow but the solution there did not work for me.
I am new to Ruby, so any help would be much appreciated.
This is the full output from the terminal by the way.
ruby-2.3.1 - #removing src/ruby-2.3.1..
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/osx/10.12/x86_64/ruby-2.3.1.tar.bz2
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
ruby-2.3.1 - #configure
ruby-2.3.1 - #download
ruby-2.3.1 - #validate archive
ruby-2.3.1 - #extract
ruby-2.3.1 - #validate binary
Libraries missing for ruby-2.3.1: /Users/travis/.rvm/rubies/ruby-2.3.1/lib/libruby.2.3.0.dylib,/usr/local/opt/gdbm/lib/libgdbm.4.dylib. Refer to your system manual for installing libraries
Mounting remote ruby failed with status 10, trying to compile.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/sabrina.zuraimi/.rvm/rubies/ruby-2.3.1, this may take a while depending on your cpu(s)...
ruby-2.3.1 - #downloading ruby-2.3.1, this may take a while depending on your connection...
ruby-2.3.1 - #extracting ruby-2.3.1 to /Users/sabrina.zuraimi/.rvm/src/ruby-2.3.1....
ruby-2.3.1 - #configuring......................................................|
ruby-2.3.1 - #post-configuration.
ruby-2.3.1 - #compiling...........
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/sabrina.zuraimi/.rvm/log/1481003831_ruby-2.3.1/make.log
compiling enc/utf_8.c
compiling enc/trans/newline.c
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling dmyenc.c
linking miniruby
config.status: creating ruby-runner.c
generating encdb.h
encdb.h updated
rbconfig.rb updated
generating enc.mk
making srcs under enc
/bin/sh: /Applications/Xcode-beta: No such file or directory
make: *** [srcs-enc] Error 127
++ return 2
I have the same error but the installation completes successfully.
Napuka:~ joaquin$ rvm install ruby-2.3.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.3.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/joaquin/.rvm/rubies/ruby-2.3.3, this may take a while depending on your cpu(s)...
ruby-2.3.3 - #downloading ruby-2.3.3, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13.7M 100 13.7M 0 0 2219k 0 0:00:06 0:00:06 --:--:-- 2220k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.3.3 - #extracting ruby-2.3.3 to /Users/joaquin/.rvm/src/ruby-2.3.3....
ruby-2.3.3 - #configuring......................................................|
ruby-2.3.3 - #post-configuration.
ruby-2.3.3 - #compiling........................................................-
ruby-2.3.3 - #installing.........
ruby-2.3.3 - #making binaries executable..
Installed rubygems 2.5.2 is newer than 2.4.8 provided with installed ruby, skipping installation, use --force to force installation.
ruby-2.3.3 - #gemset created /Users/joaquin/.rvm/gems/ruby-2.3.3#global
ruby-2.3.3 - #importing gemset /Users/joaquin/.rvm/gemsets/global.gems.........|
ruby-2.3.3 - #generating global wrappers........
ruby-2.3.3 - #gemset created /Users/joaquin/.rvm/gems/ruby-2.3.3
ruby-2.3.3 - #importing gemsetfile /Users/joaquin/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.3.3 - #generating default wrappers........
ruby-2.3.3 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.3.3 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
But your message looks quite explicit:
/bin/sh: /Applications/Xcode-beta: No such file or directory
Do you have that directory?
First of all, do you have Xcode installed? If not, you can just get the command line tools here: http://railsapps.github.io/xcode-command-line-tools.html
It seems like the message is saying that you had Xcode-beta but removed it and now it has no way to install properly. The command line tools should be good enough

Trying to get rvm to work, but getting error running

I get the following Error when running rvm reinstall 1.9.3, I followed some advice to deleted these files and folders below, now I dont have them even after removing rvm and reinstalling with curl, what do I do? I used the rails installer, and I think that is what has messed this whole thing up. I just want to start from scratch.
rm -rf /opt/sm
rm /etc/rvmrc
rm /etc/profile.d/sm.sh
I also get this output when trying to install rvm reinstall 1.9.3
$ rvm reinstall 1.9.3
Removing /usr/local/rvm/src/ruby-1.9.3-p385...
Removing /usr/local/rvm/rubies/ruby-1.9.3-p385...
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p385.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives
Extracting yaml to /usr/local/rvm/src/yaml-0.1.4
Configuring yaml in /usr/local/rvm/src/yaml-0.1.4.
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --prefix=/usr/local/rvm/usr --disable-shared', please read /usr/local/rvm/log/ruby-1.9.3-p385/yaml/configure.log
Compiling yaml in /usr/local/rvm/src/yaml-0.1.4.
Error running 'make', please read /usr/local/rvm/log/ruby-1.9.3-p385/yaml/make.log
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p385, this may take a while depending on your cpu(s)...
ruby-1.9.3-p385 - #downloading ruby-1.9.3-p385, this may take a while depending on your connection...
ruby-1.9.3-p385 - #extracting ruby-1.9.3-p385 to /usr/local/rvm/src/ruby-1.9.3-p385
ruby-1.9.3-p385 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p385
ruby-1.9.3-p385 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p385 --with-opt-dir=/usr/local/rvm/usr --disable-shared', please read /usr/local/rvm/log/ruby-1.9.3-p385/configure.log
There has been an error while running configure. Halting the installation.
PLEASE help this has been taking me forever, to figure this out.
make.log
[2013-02-11 21:27:46] make
make: *** No targets specified and no makefile found. Stop.
after removing the files you need also open new terminal - if it does not help - restart computer

Ruby installation issue using RVM

I am having trouble installing Ruby using RVM. I had tried using readline and other suggestions online. None of the solutions worked.
I use Cygwin, Bash and have RVM installed.
rvm install 1.9.2
No binary rubies available for: /ruby-1.9.2-p320.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /home/arvenkataraman/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /home/arvenkataraman/.rvm/src
Configuring yaml in /home/arvenkataraman/.rvm/src/yaml-0.1.4.
Compiling yaml in /home/arvenkataraman/.rvm/src/yaml-0.1.4.
Error running 'make', please read /home/arvenkataraman/.rvm/log/ruby-1.9.2-p320/yaml/make.log
Installing Ruby from source to: /home/arvenkataraman/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)...
ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, this may take a while depending on your connection...
ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /home/arvenkataraman/.rvm/src/ruby- 1.9.2-p320
ruby-1.9.2-p320 - #extracted to /home/arvenkataraman/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #configuring
ruby-1.9.2-p320 - #compiling
ruby-1.9.2-p320 - #installing
ruby-1.9.2-p320 is not installed.
To install do: 'rvm install ruby-1.9.2-p320'
I see the below in the error log "/home/arvenkataraman/.rvm/log/ruby-1.9.2-p320/yaml/make.log"
$ cat /home/arvenkataraman/.rvm/log/ruby-1.9.2-p320/yaml/make.log
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/arvenkataraman/.rvm/src/yaml-0.1.4/config/missing --run aclocal-1.11
cd . && /bin/sh /home/arvenkataraman/.rvm/src/yaml-0.1.4/config/missing --run automake-1.11 --foreign
src/Makefile.am:2: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:2: The usual way to define `LIBTOOL' is to add `LT_INIT'
src/Makefile.am:2: to `configure.ac' and run `aclocal' and `autoconf' again.
src/Makefile.am:2: If `LT_INIT' is in `configure.ac', make sure
src/Makefile.am:2: its definition is in aclocal's search path.
Makefile:256: recipe for target `Makefile.in' failed
make: *** [Makefile.in] Error 1
This work for me make sure RVM is up to date
rvm get head
CC=/usr/bin/gcc rvm install 1.9.2 --enable-shared
note: /usr/bin/gcc ==> path/to/gcc
few steps:
update RVM: rvm get head
read and follow instructions: rvm requirements
reinstall ruby: rvm reinstall 1.9.2

Resources