Reputation: 35
Following the guide located here to setup ruby on rails: https://gorails.com/setup/ubuntu/14.04
I'm able to install ruby just fine using rbenv. I was able to get github setup. The step I'm getting an error on is when installing rails.
The 'gem install rails' command produces the following error:
matt@matt-desktop:~$ gem install rails
ERROR: While executing gem ... (Gem::Exception)
Invalid spec cache file in /home/matt/.gem/specs/api.rubygems.org%443/latest_specs.4.8
Any thoughts on how to overcome error?
Upvotes: 1
Views: 398
Reputation: 1
I had problems for a few weeks setting a full rails development environment on ubuntu 14.04. After a lot of headaches I came up with a solution for a lazy man, works without a problem. Just try
\curl -sSL https://get.rvm.io | bash -s stable --rails
It's not going to do the job first time, you have to import a key, you have an explanation in the terminal above. Just copy/paste the line with the command. Then run the curl again and it will install rvm, then rails and the ruby itself. The easiest way I found so far. Hope this helps.
Upvotes: 0
Reputation: 35493
Try this:
gem sources --clear-all
gem sources --update
If that doesn't work, see my longer answer here: Corrupted ruby gem system
Upvotes: 1