make gem install more verbose

Angelegt von andi Thu, 27 Jan 2011 13:14:00 GMT

Sometimes when you try to install a gem, you spent quite some time waiting to get some feedback about what actually happens. If you need a more verbose install process, just add the ‘–verbose’ option to the command line, like this:

sudo gem install sinatra --verbose

Quickly 'move' gems to another server

Angelegt von andi Fri, 30 Jul 2010 02:38:00 GMT

For example when moving from one to another server, the task to install all gems rails applications on the new server will need.

First get a list of all gems one the old server, with:

 

gem list

 

 

, then use a script like this one to remove version numbers from the script, and generate a list of gems...

 

 

	@output = ""

	File.open('gems').each_line do |l|

	 @output << l.gsub(/\(.+\)/,'').strip + ' '

	end

 

 

and pass it to gem install ...

Obviously this script would isn't that cool - it lacks support for multiple version numbers - and after all doesn't take care of the right version numbers at all.

For my todays (tonights) purpose that was enough, but if i find the time, i'll rewrite it to take the gem list's output, and install all the gems with all the right versions on the new server...