Operating System: CentOS 6.2 x86_64
I apologize for the indentation was erratic. This is my first SO post, and I'm new to setting up servers. I study, although I will tell you in detail about the steps that I took to try to solve this, and also where I was looking for help. I am a beginner young web developer, and I work on a server that someone else set up, so this whole experience is new to me.
I am preparing a linode that I recently purchased to run a rails application. I completed the initial installation guide presented here http://blog.blenderbox.com/2011/01/07/installing-rvm-ruby-rails-passenger-nginx-on-centos/ , and also changing the step:
sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide )
To reflect the changes recommended in this SO RVM thread, system-wide installation of script url broken - what is a replacement?
bash -c "bash <( curl -L https://github.com/wayneeseguin/rvm/raw/1.3.0/contrib/install-system-wide ) --version '1.3.0'"
I settled on installing ngix because I am using Apache2. I also had to run rvm requirements and install the necessary packages before installing the rails. Here libyaml was set for installation, and the first error occurred while trying to install it. However, yum reported that it does not exist. The initial installation of RVM and Gems seemed to work, but I had a problem with the lack of Gems "Psych", and then asked to install libyaml:
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in '<top (required)>': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby.
So I first tried installing libyaml via Yum, but got this error:
yum install libyaml Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: centosmirror.quintex.com * extras: centosmirror.quintex.com * updates: centosmirror.quintex.com Setting up Install Process No package libyaml available. Error: Nothing to do
Trying to install libyaml-devel and libyaml-dev had the same problem.
After doing some research, I found this blog post from CollectiveIdea that detailed the same problem and suggested a solution. Blog post on a collective idea I followed the instructions and completed the installation without any setup or configuration issues. Then I performed a ruby reinstall. I was still presented with the same warning and searched further in SO for similar questions. As described in the answers to this question regarding the same problem, how to solve the “ruby installation went missing” error? Using:
rvm pkg install libyaml Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives Extracting yaml-0.1.4.tar.gz to /usr/local/rvm/src Prepare yaml in /usr/local/rvm/src/yaml-0.1.4. Configuring yaml in /usr/local/rvm/src/yaml-0.1.4. Compiling yaml in /usr/local/rvm/src/yaml-0.1.4. Installing yaml to /usr/local/rvm/usr
Please note that it required to reinstall all rubies:
It was recommended to reinstall everything through RVM, and I also followed these instructions.
rvm reinstall all --force Removing /usr/local/rvm/src/ruby-1.9.3-p194... Removing /usr/local/rvm/rubies/ruby-1.9.3-p194... mv: overwrite `/usr/local/rvm/user/installs'? y No binary rubies available for: ///ruby-1.9.3-p194. Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)... ruby-1.9.3-p194 -
Even after that, the warning is still present. I checked the ruby installation on ruby -v and it is actually installed. Libyaml files have been installed, they are here:
[ root@li543-100 ~]
You can also see that I tried to create a symbolic link between / usr / local / lib and / usr / local / rvm / lib under the assumption that the yaml files could be installed in the wrong directory or that rvm did not look in the corresponding directory for them. I ran that ruby and thought that Ruby was in the / rvm directory, which might be a problem:
[ root@li543-100 ~]
It did not help. Therefore, I am on the fence, where I made a mistake or what I’m not looking for.
1: I made an installation error by placing the files in the wrong directory?
2: Ruby looking for libyaml files in another directory?
3: When I followed the blog posts, I was not able to add any feature of the system to install?
I redid CentOS on my linode 4 times, hoping that this was a problem with me not matching the scripts accordingly, I am on the fifth deployment with the same problem. I'm currently looking for SO for number 2, and hopefully my post is not inappropriate, as this is explicitly allowed elsewhere. I would appreciate any help you could provide.
EDIT:
So, after redistributing the CentOS6.2 OS, I ran the modified setup as follows:
yum -y install git yum -y install curl groupadd rvm usermod -a -G rvm root bash -c "bash <( curl -L https://github.com/wayneeseguin/rvm/raw/1.3.0/contrib/install-system-wide) -- version'1.3.0'" echo '[[ -s "/usr/local/lib/rvm" ]] && . "/usr/local/lib/rvm" #This loads RVM into a shell session' >> ~/.bash_profile source ~/.bash_profile yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel rvm get head yum install readline readline-devel rvm package install libyaml -v rvm install 1.9.3 -v rvm use 1.9.3 ruby -v
This also still encounters an error:
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby.
Running previous commands to get libyaml from RVM and reinstalling all rubies doesn't seem to fix the problem for me. When rvm is running, reinstall all --force, will the installation of the previous libyaml package be removed, rewritten or replaced? It seems to be in the correct directories.
[ root@li543-100 src]
EDIT # 2:
After abandoning another installation on a new CentOS 5.6 deployment, I explicitly made a fatal error during the installation process. Before doing rvm install 1.9.3 I had to run rvm install 1.8.7 . In addition, this time I deployed a 32-bit image of CentOS6.2.
Gem launch at 1.8.7
[ root@li543-100 ~]# gem -v 1.8.24
Now I run rvm install 1.9.2
[ root@li543-100 ~]
Switching to 1.9.3: Error returns
[ root@li543-100 ~]
So it looks like rvm is using 1.9.3 (I think I'm using -p194, I have not tested it before) it causes some kind of communication problem in terms of where rvm trying to load libyaml. For now, I will use 1.9.2, since most of this material was slightly above my head. I am sure that I made a mistake in the absence of any dependency that 1.9.3 requires or does not adjust the configuration file accordingly. At least this is my guess, the first installation of the server, so a lot of this guessed.