How to resolve these errors during upgrade ruby? - ruby

Fetching yaml-0.1.4.tar.gz to /Users/dmonkeys/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/dmonkeys/.rvm/src
Error running 'tar xmzf /Users/dmonkeys/.rvm/archives/yaml-0.1.4.tar.gz -C /Users/dmonkeys/.rvm/src ', please read /Users/dmonkeys/.rvm/log/ruby-1.9.3-p194/yaml/extract.log
Configuring yaml in /Users/dmonkeys/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/dmonkeys/.rvm/usr" ', please read /Users/dmonkeys/.rvm/log/ruby-1.9.3-p194/yaml/configure.log
Compiling yaml in /Users/dmonkeys/.rvm/src/yaml-0.1.4.
Error running 'make -j2', please read /Users/dmonkeys/.rvm/log/ruby-1.9.3-p194/yaml/make.log
Database file /Users/dmonkeys/.rvm/config/packages does not exist.
Installing Ruby from source to: /Users/dmonkeys/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #fetching
ruby-1.9.3-p194 - #extracted to /Users/dmonkeys/.rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #configuring
Error running ' ./configure --prefix=/Users/dmonkeys/.rvm/rubies/ruby-1.9.3-p194 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/dmonkeys/.rvm/usr ', please read /Users/dmonkeys/.rvm/log/ruby-1.9.3-p194/configure.log
There has been an error while running configure. Halting the installation.
ruby-1.9.3-p194 is not installed.
Creating alias default for ruby-1.9.3-p194.
Recording alias default for ruby-1.9.3-p194.
Creating default links/files
ruby-1.9.3-p194 is not installed.
Could not load ruby ruby-1.9.3-p194.
/Users/dmonkeys/.rvm/scripts/alias: line 133: /Users/dmonkeys/.rvm/rubies/ruby-1.9.3-p194/bin/ruby: No such file or directory

Make sure you have the Xcode "Command Line Tools" package installed. Xcode alone is no longer sufficient.
You can do this by downloading them separately or by enabling that package in the Organizer.
This is the most common case for installation failure. You didn't post the contents of the log that was mentioned in the output you pasted.

Related

SSL certificate error installing ruby via rvm

I am trying to install ruby using rvm, and I am getting the following output related to an SSL certificate error:
rvm install 2.6.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/11.2/x86_64/ruby-2.6.3.
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/user/.rvm/rubies/ruby-2.6.3, this may take a while depending on your cpu(s)...
ruby-2.6.3 - #downloading ruby-2.6.3, this may take a while depending on your connection...
ruby-2.6.3 - #extracting ruby-2.6.3 to /Users/user/.rvm/src/ruby-2.6.3 - please wait
ruby-2.6.3 - #configuring - please wait
ruby-2.6.3 - #post-configuration - please wait
ruby-2.6.3 - #compiling - please wait
ruby-2.6.3 - #installing - please wait
ruby-2.6.3 - #making binaries executable - please wait
curl: (60) SSL: no alternative certificate subject name matches target host name 'rubygems.org'
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
There was an error while trying to resolve rubygems version for 'latest'.
Halting the installation.
If anyone has any idea how to get around this error, a response would really be appreciated.
Thanks!
seems that you have connection problem to rubygems.org, make sure you have a good internet connection so that the files needed by installation could be downloaded.
forget RVM, use rbenv instead.
If you still get this kind of issue( ssl cert related when downloading from rubygems.org or ruby-lang.org), try to choose a new mirror of rvm/rbenv. e.g. for example, people in China may choose taobao mirror when install: git clone https://github.com/andorchen/rbenv-taobao-mirror.git ~/.rbenv/plugins/rbenv-taobao-mirror

Installing RVM on OpenBSD: ruby: can't load library

Using a [fairly vanilla] OpenBSD 6.0 x64 VM to try out RVM. I follow the instructions on how to install RVM and do the following:
# curl -sSL https://get.rvm.io | bash -s stable --ruby
ksh: bash: not found
ksh: curl: not found
# pkg_add curl bash
quirks-2.241 signed on 2016-07-26T16:56:10Z
curl-7.49.0:libidn-1.32p1: ok
curl-7.49.0: ok
bash-4.3.46: ok
# curl -sSL https://get.rvm.io | bash -s stable --ruby
Trying to install GNU version of tar, might require sudo password
quirks-2.241 signed on 2016-07-26T16:56:10Z
gtar-1.29: ok
Downloading https://github.com/rvm/rvm/archive/1.28.0.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.28.0/1.28.0.tar.gz.asc
curl: (22) The requested URL returned error: 404 Not Found
Could not download 'https://github.com/rvm/rvm/releases/download/1.28.0/1.28.0.tar.gz.asc'.
curl returned status '22'.
Creating group 'rvm'
Installing RVM to /usr/local/rvm/
Installation of RVM in /usr/local/rvm/ is almost complete:
* First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# Administrator,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: https://rvm.io/help and https://twitter.com/rvm_io
rvm 1.28.0 (latest) by Wayne E. Seguin , Michal Papis [https://rvm.io/]
Searching for binary rubies, this might take some time.
No binary rubies available for: openbsd/6.0/x86_64/ruby-2.3.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for openbsd.
WARNING: $PKG_PATH was not set, using fallback 'http://ftp.openbsd.org/pub/OpenBSD/6.0/packages/amd64/',
see http://www.openbsd.org/ftp.html for list of available mirrors.
Installing requirements for openbsd.
Updating system.
Installing required packages: gcc-4, automake-1, libtool, bison, readline-6, libyaml-0.
Requirements installation successful.
Found user configured '-j' flag in 'rvm_make_flags', please note that RVM can detect number of CPU threads and set the '-j' flag automatically if you do not set it.
Installing Ruby from source to: /usr/local/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 3734k 0 0:00:03 0:00:03 --:--:-- 4000k
ruby-2.3.3 - #extracting ruby-2.3.3 to /usr/local/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..
ruby-2.3.3 - #downloading rubygems-2.6.8
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 736k 100 736k 0 0 1087k 0 --:--:-- --:--:-- --:--:-- 1089k
ruby-2.3.3 - #extracting rubygems-2.6.8....
ruby-2.3.3 - #removing old rubygems.........
$LANG was empty, setting up LANG=en_US.UTF-8, if it fails again try setting LANG to something sane and try again.
ruby-2.3.3 - #installing rubygems-2.6.8.
Error running 'env GEM_HOME=/usr/local/rvm/gems/ruby-2.3.3#global GEM_PATH= /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby -d /usr/local/rvm/src/rubygems-2.6.8/setup.rb --no-docu ment',
showing last 15 lines of /usr/local/rvm/log/1482173449_ruby-2.3.3/rubygems.install.log
[2016-12-19 13:56:46] /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby
current path: /usr/local/rvm/src/rubygems-2.6.8
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/local/rvm/bin
command(7): env GEM_HOME=/usr/local/rvm/gems/ruby-2.3.3#global GEM_PATH= /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby -d /usr/local/rvm/src/rubygems-2.6.8/setup.rb --no-documen t
ruby: can't load library 'libruby.so.2.30'
First, I tried to install RVM using the same procedure on one of our OpenBSD 5.8 development machines as a local user and got the same issue. I decided to try it on a newer VM as root which is what I show above. Both cases 'libruby.so.2.30' exists either locally (~/.rvm/rubies/ruby-2.3.0/lib/libruby.so.2.30) for the user or in /usr/local/rvm/rubies/ruby-2.3.3/lib for the case I show above.
If I try to add the path to the linker config using ldconfig and manually execute the failing command :
# ldconfig /usr/local/lib /usr/local/rvm/rubies/ruby-2.3.3/lib
# cd /usr/local/rvm/src/rubygems-2.6.8
# env GEM_HOME=/usr/local/rvm/gems/ruby-2.3.3#global GEM_PATH= /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby -d /usr/local/rvm/src/rubygems-2.6.8/setup.rb --no-document
Exception `LoadError' at /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems.rb:1345 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems.rb:1354 - cannot load such file -- rubygems/defaults/ruby
Exception `LoadError' at /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- did_you_mean
Exception `LoadError' at /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:135 - cannot load such file -- did_you_mean
... lots of stdoutput regarding RubyGems changelog...
It seems the library has been built and it can execute the command (with errors, but the binary works) which probably has something to do with me executing this stuff out of the context of the script itself I assume.
This is a scripted install. It seems that RVM should be setting up something for the linker to know about the existence of these libraries (it created them in the first place), but it doesn't appear to be working out.
Is this a bug with RVM on OpenBSD or it is something I am not doing correctly?

rvm pkg install ree_dependencies gives error about autoreconf

I am running this command on Linux Mint 14 Mate:
rvm pkg install ree_dependencies --verify-downloads 1
and I get this error:
Fetching ncurses-5.7.tar.gz to /home/john/.rvm/archives
Extracting ncurses to /home/john/.rvm/src/ncurses-5.7
Prepare ncurses in /home/john/.rvm/src/ncurses-5.7.
Error running 'autoreconf -is --force', please read /home/john/.rvm/log/ncurses/autoreconf.log
Configuring ncurses in /home/john/.rvm/src/ncurses-5.7.
Error running './configure --prefix=/home/john/.rvm/usr --with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs', please read /home/john/.rvm/log/ncurses/configure.log
Compiling ncurses in /home/john/.rvm/src/ncurses-5.7.
Error running 'make', please read /home/john/.rvm/log/ncurses/make.log
and here is the log file:
configure:5967: error: possibly undefined macro: AC_DIVERT_HELP
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
I googled for the solution, but got nothing.
Your help is highly appreciated.
instead of ree_dependencies you should read output of rvm requirements - it will show you what needs to be installed.
A word of advice - REE is based on Ruby 1.8 which is no longer maintained, only security fixes will be released for few months, you really should try a newer ruby like 1.9.3, or if it's new project - try ruby 2.0.0 preview2:
rvm install ruby-2.0.0

Error Installing ruby with RVM Single User mode on Arch Linux

I've just installed RVM on ArchLinux x64 in single user mode via the recommended install script
curl -L https://get.rvm.io | bash -s stable
I've also installed all the requirements listed in rvm requirements
However, I'm having trouble actually installing any version of ruby. And getting the following error:
arch:~ % rvm install 1.9.3
No binary rubies available for: ///ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /home/christopher/.rvm/archives
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 460k 100 460k 0 0 702k 0 --:--:-- --:--:-- --:--:-- 767k
Extracting yaml-0.1.4.tar.gz to /home/christopher/.rvm/src
Prepare yaml in /home/christopher/.rvm/src/yaml-0.1.4.
Configuring yaml in /home/christopher/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix=/home/christopher/.rvm/usr ', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/yaml/configure.log
Compiling yaml in /home/christopher/.rvm/src/yaml-0.1.4.
Error running 'make', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/yaml/make.log
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Installing Ruby from source to: /home/christopher/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /home/christopher/.rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #extracted to /home/christopher/.rvm/src/ruby-1.9.3-p194
Skipping configure step, 'configure' does not exist, did autoreconf not run successfully?
ruby-1.9.3-p194 - #compiling
Error running 'make', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/make.log
There has been an error while running make. Halting the installation.
The log files are as follows:
arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/yaml/configure.log
__rvm_log_command:32: permission denied:
arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/yaml/make.log
make: *** No targets specified and no makefile found. Stop.
arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/make.log
make: *** No targets specified and no makefile found. Stop.
I'm having this same problem on two machines running Mac OS 10.6.8.
I was able to fix the yaml problem by manually cd-ing into the directory and running ./configure. eg:
$ cd /home/christopher/.rvm/src/yaml-0.1.4
$ ./configure --prefix=/home/christopher/.rvm/usr
After running "rvm install 1.9.3" a couple more times, it picked up the configuration I'd done, and stopped bothering me about the yaml issue.
I was also able to cd into the ruby directory and configure and make it. eg:
$ /home/christopher/.rvm/src/ruby-1.9.3-p194
$ ./configure
$ make
$ make install
...However, this didn't cause rvm to pick it up. I'm guessing I was missing some necessary command line options and flags.
But considering I was able to get as far as I did, it seems to me like it's an rvm bug.

Ruby 1.9.3, RVM, readline won't install/compile

I am running into the following error. I was using RVM with Ruby 1.9.2 and all worked perfect. I updated to ruby version 1.9.3 und now I am getting an load error when I try to use the irb.
/home/pabera/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require': cannot load such file -- active_support (LoadError)
Actually I have all the readline packages installed (it worked fine with 1.9.2)
Now I tried several thinks, using rvm pkg readline. Doing this, I get the following output.
$ rvm pkg install readline
Fetching readline-5.2.tar.gz to /home/pabera/.rvm/archives
Extracting readline-5.2.tar.gz to /home/pabera/.rvm/src
Applying patch '/home/pabera/.rvm/patches/readline-5.2/shobj-conf.patch'...
Prepare readline in /home/pabera/.rvm/src/readline-5.2.
Error running 'autoreconf -is --force', please read /home/pabera/.rvm/log/readline/autoreconf.log
Configuring readline in /home/pabera/.rvm/src/readline-5.2.
Compiling readline in /home/pabera/.rvm/src/readline-5.2.
Installing readline to /home/pabera/.rvm/usr
Fetching readline-6.2.tar.gz to /home/pabera/.rvm/archives
Extracting readline-6.2.tar.gz to /home/pabera/.rvm/src
Applying patch '/home/pabera/.rvm/patches/readline-6.2/patch-shobj-conf.diff'...
Prepare readline in /home/pabera/.rvm/src/readline-6.2.
Error running 'autoreconf -is --force', please read /home/pabera/.rvm/log/readline/autoreconf.log
Configuring readline in /home/pabera/.rvm/src/readline-6.2.
Compiling readline in /home/pabera/.rvm/src/readline-6.2.
Installing readline to /home/pabera/.rvm/usr
I get the error in the middle, and I don't know how to fix it
Error running 'autoreconf -is --force', please read /home/pabera/.rvm/log/readline/autoreconf.log
My Autoconf.log output. Might this autoconf problem cause my issues? And yes, how would I fix thos missing templates then?
$ cat /home/pabera/.rvm/log/readline/autoreconf.log
[2012-03-19 10:07:03] autoreconf -is --force
autoheader: warning: missing template: CTYPE_NON_ASCII
autoheader: Use AC_DEFINE([CTYPE_NON_ASCII], [], [Description])
autoheader: warning: missing template: FIONREAD_IN_SYS_IOCTL
autoheader: warning: missing template: HAVE_BSD_SIGNALS
autoheader: warning: missing template: HAVE_GETPW_DECLS
...
autoreconf: /usr/bin/autoheader failed with exit status: 1
Do you have any suggestions?
Looks like you might forgot to use a ruby:
rvm use 1.9.3 --default
The default flag will tell rvm to use it for new terminals.
For using with projects (like rails):
cd projects/my-app
rvm use 1.9.3#my-app --rvmrc --create
Which will create a gemset my-app and project configuration file .rvmrc - now when you cd to that dir RVM wil swithc to that ruby#gemset.
There is very nice screencast showing basics of rvm usage: http://screencasts.org/episodes/how-to-use-rvm

Resources