After install RVM rails dont work #1182

Closed
duard opened this Issue Oct 3, 2012 · 11 comments

Projects

None yet

5 participants

@duard
duard commented Oct 3, 2012

I'm using CentOS 6.3

-bash-4.1$ gem install rails /home/carcia/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. Successfully installed rails-3.2.8 1 gem installed -bash-4.1$ rails -v -bash: rails: command not found rvm info

ruby-1.9.3-p194:

system:
uname: "Linux madara.com.ar 2.6.18-308.8.2.el5.028stab101.1 #1 SMP Sun Jun 24 20:25:35 MSD 2012 x86_64 x86_64 x86_64 GNU/Linux"
system: "centos/6.3/x86_64"
bash: "/bin/bash => GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)"
zsh: "/bin/zsh => zsh 4.3.10 (x86_64-redhat-linux-gnu)"

rvm:
version: "rvm 1.16.6 (stable) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]"
updated: "12 minutes 17 seconds ago"

ruby:
interpreter: "ruby"
version: "1.9.3p194"
date: "2012-04-20"
platform: "x86_64-linux"
patchlevel: "2012-04-20 revision 35410"
full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]"

homes:
gem: "/home/carcia/.rvm/gems/ruby-1.9.3-p194"
ruby: "/home/carcia/.rvm/rubies/ruby-1.9.3-p194"

binaries:
ruby: "/home/carcia/.rvm/rubies/ruby-1.9.3-p194/bin/ruby"
irb: "/home/carcia/.rvm/rubies/ruby-1.9.3-p194/bin/irb"
gem: "/home/carcia/.rvm/rubies/ruby-1.9.3-p194/bin/gem"
rake: "/home/carcia/.rvm/rubies/ruby-1.9.3-p194/bin/rake"

environment:
PATH: "/home/carcia/.rvm/gems/ruby-1.9.3-p194/bin:/home/carcia/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/carcia/.rvm/rubies/ruby-1.9.3-p194/bin:/home/carcia/.rvm/bin:/home/carcia/perl5/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/carcia/bin"
GEM_HOME: "/home/carcia/.rvm/gems/ruby-1.9.3-p194"
GEM_PATH: "/home/carcia/.rvm/gems/ruby-1.9.3-p194:/home/carcia/.rvm/gems/ruby-1.9.3-p194@global"
MY_RUBY_HOME: "/home/carcia/.rvm/rubies/ruby-1.9.3-p194"
IRBRC: "/home/carcia/.rvm/rubies/ruby-1.9.3-p194/.irbrc"
RUBYOPT: ""
gemset: ""

@mpapis mpapis was assigned Oct 3, 2012
@mpapis
Member
mpapis commented Oct 3, 2012

I will provide new binary build with fixed libyaml, till then you can try this fix:

rvm reinstall 1.9.3 --disable-binary

It will take longer to install as it will compile ruby instead of downloading binary ruby for your platform.

@duard
duard commented Oct 3, 2012

theres more information

https://gist.github.com/3828131

@duard
duard commented Oct 3, 2012

hmm,

~]# rvm reinstall 1.9.3 --disable-binary
Removing /home/carcia/.rvm/src/ruby-1.9.3-p194...
Removing /home/carcia/.rvm/rubies/ruby-1.9.3-p194...
Installing Ruby from source to: /home/carcia/.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/carcia/.rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #extracted to /home/carcia/.rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #configuring
ruby-1.9.3-p194 - #compiling
ruby-1.9.3-p194 - #installing
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.3-p194 ...
Installation of rubygems completed successfully.
Saving wrappers to '/home/carcia/.rvm/bin'.
ruby-1.9.3-p194 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p194 - #importing default gemsets (/home/carcia/.rvm/gemsets/)
Install of ruby-1.9.3-p194 - #complete
Making gemset ruby-1.9.3-p194 pristine.

hours ...

@alh13
alh13 commented Oct 9, 2012

I've been having the same (or similar) problem this week with SOURCE builds on CentOS 5.6 and CentOS 5.8:

[root ~]# rvm install 1.9.3
(snip)
No binary rubies available for: redhat//i386/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 /usr/local/rvm/archives
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 460k 100 460k 0 0 131k 0 0:00:03 0:00:03 --:--:-- 160k
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
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...

...etc, everything appears to install fine. But any "gem" command or any script that does "require yaml" will output:

/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.

I was able to fix this by installing libyaml and libyaml-devel RPMS via yum. But it threw me off at first because I saw RVM building its own libyaml so I didn't think I needed to install the RPMS...

The above transcript is CentOS 5.8 on i386 but I see the same problem with CentOS 5.6 on x86_64.

Thanks!

@brocktimus

I had a similar issue to the above poster and found lots of "similar" problems over the past few years. Adding the libyaml it builds to my LD_LIBRARY_PATH fixed the issue. Wasn't exactly sure why this helped, because all the linkers and the like seemed fine.

in /.bashrc (I did a user install)
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:
/.rvm/usr/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH

Hope that can help shed some light.

@billywatson

We were also having this issue, but installing libyaml and libyaml-devel did not fix the issue. We did not try putting those lines in ~/.bashrc. Instead, we went back to a known good version for us, 1.15.8, I believe.

@mpapis
Member
mpapis commented Oct 10, 2012

@billywatson as a side note: rvm get latest-1.15 - will keep you working on latest from 1.15

@billywatson

@mpapis thanks!

@duard
duard commented Oct 10, 2012

my problem was the file .gemrc
I remove that file and now I can install rails :-)
but the problem with libyaml continues !

@mpapis
Member
mpapis commented Oct 17, 2012

RVM 1.16.14 contains new set of binary rubies, please try again:

rvm get stable
rvm reload
rvm reinstall 1.9.3
@mpapis
Member
mpapis commented Oct 22, 2012

I assume this is fixed, let me know if it is still broken

@mpapis mpapis closed this Oct 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment