Showing posts with label rubyonrails. Show all posts
Showing posts with label rubyonrails. Show all posts

Monday, November 14, 2011

Invalid gemspec in [/var/lib/gems/1.8/specifications

Environment:
Ubuntu 11.10


Problem:
Invalid gemspec in [/var/lib/gems/1.8/specifications/json-1.6.1.gemspec]: invalid date format in specification: "2011-09-18 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/json-1.6.1.gemspec]: invalid date format in specification: "2011-09-18 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"


Solution:
sudo sed -i 's/ 00:00:00.000000000Z//' /var/lib/gems/1.8/specifications/*

Whenever you install some new gem and encounter similar message, just run the script again.

Thursday, October 27, 2011

Installing RVM on Ubuntu 11.10

sudo apt-get install build-essential libopenssl-ruby libfcgi-dev
sudo apt-get install ruby irb rubygems ruby1.8-dev
sudo apt-get install sqlite3 libsqlite3-dev

sudo apt-get install git
sudo apt-get install curl
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
gedit ~/.bashrc
and add the following line to the end (and save the file)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

rvm requirements
rvm install 1.9.2
rvm use 1.9.2 --default
gem install rails

Monday, March 22, 2010

Ubuntu 9.10 | gem installation

~$ gem -v
The program 'gem' can be found in the following packages:
* rubygems1.8
* rubygems1.9.1
Try: sudo apt-get install
gem: command not found
~$ sudo apt-get install rubygems1.9.1