Showing posts with label Ruby. Show all posts
Showing posts with label Ruby. Show all posts

Sunday, August 12, 2012

ruby rails - examples for date time helpers

with the time helpers it is amazingly easy to deal with dates and times (add, diff...)

$ rails console
  >> 1.year.from_now
  => Sun, 13 Mar 2011 03:38:55 UTC +00:00
  >> 10.weeks.ago
  => Sat, 02 Jan 2010 03:39:14 UTC +00:00
  >> 1.hour.from_now
  => Sun, 12 Aug 2012 09:52:39 UTC +00:00 
  >> 30.seconds.from_now
  => Sun, 12 Aug 2012 08:54:00 UTC +00:00 
 

Wednesday, August 8, 2012

Tuesday, January 4, 2011

installing gems through proxy


Try one of these:
  • gem install -p [http://proxy-url] rails  


  • gem install rails -p [http://user@pass:proxy-url]  


  • set HTTP_PROXY="http://proxyurl:8080"

  • Sunday, November 28, 2010