I recently installed 11.10. I had tried to install Ruby and RubyGems but was unable to use them in 10.10. This time around I am trying again to install Ruby and RubyGems. It looks like I have messed things up badly in no time. I am wondering whether there is an easy and proven way of either correcting the broken installs or redoing a clean install of Ruby and RubyGems in Ubuntu 11.10
To be very clear: I am not a Ruby developer, I know nothing about it. I just need to use a couple of gems. I have little more than monkey abilities managing my system... I'm sorry, I really need "install Ruby and RubyGems on Ubuntu 11.10 for dummies"
Some details below.
What I did, vaguely:
I have tried a few different things over the past two weeks but it seems utterly broken or I have no clue what I have done wrong. I am completely lost because I keep finding contradicting advices on the recommended way of installing R&RG (including in this forums). Some claim RVM is recommended, some claim Iit is not the Debian/Ubuntu way.
I think over time, I followed a number of conflicting advices, installed Rubys (some variant of 1.9.2) and RubyGems, although I can't recall how. I also installed RVM. I have never managed to make use any other version of Ruby than the default 1.8(.7?) from Ubuntu.
I have (or have had) a number of problems which superficially show as errors in the command line.
i) Bad gemspecs (minor, I guess):
- Invoking gem lists various errors, lately things of the sort:
- Also, in the past I had errors in some gemspecs related to date formats. I fixed them editing as prescribed somewhere (lost the link, sorry). Maybe I messed things up.
Invalid gemspec in [/var/lib/gems/1.8/specifications/railties-3.2.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0xb5f6cc40> 3.2.0"]
ii) Permission errors (embarrassing):
I also seem to have officially entered permission hell. I think I did all my installs with sudo, as prescribed somewhere (again, lost track of the link, sorry).
If I try to install a gem, this is what I get (after the illformed errors exemplified above):
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.8 directory.