01 Jul '12, 10am

SSH Tunneling in Ruby // RailsTips by John Nunemaker:

The other day I wanted to do some queries in production, but our servers are pretty locked down to the outside world. I was well aware that I could just make an ssh tunnel to connect to the database server, but I decided I wanted to do it in Ruby. I am not the brightest of crayons in the box, so it took me a bit. Since I struggled with it for a few, I figured others probably will someday as well and decided to post my solution here. Obviously, replace the strings with <…> with your own information and change the host port information in the gateway.open call. require 'net/ssh/gateway' gateway = Net::SSH::Gateway.new('<myremotehostorip.com>', '<remote_user>') # Open port 27018 to forward to 127.0.0.1:27017 # on the remote host provided above gateway.open('127.0.0.1', 27017, 27018) # Connect to local port set in previous statement conn = Mongo::Connection.new('127.0.0.1', 27...

Full article: http://railstips.org/blog/archives/2011/04/19/ssh-tunneli...

Tweets

Best Ruby Guide, Ruby Tutorial:

rubylearning.com 01 Jul '12, 12pm

# p014constructs.rb # In Ruby, nil and false evaluate to false, # everything else (including true, 0) means true # nil is ...

下载 Ruby - Ruby 官方网站:

ruby-lang.org 02 Jul '12, 7am

在这里可以下载到适合您的最新的 Ruby 版本,当前稳定的版本是 1.9.3 。下载前请先阅读 Ruby 开源许可 。 Ruby 源代码 如果您欲使之与您的平台更为兼容或者需要专一设置您的环境,那么从源代码安装是最好的解决方案。如果有预先做好的...

Shades of Gray: Articles in Higher-Order Ruby:

blog.grayproductions.net 01 Jul '12, 11am

James Edward Gray II joined the Ruby community in 2004 and they just haven't been able to get rid of him since then. James...

#164 Cron in Ruby - RailsCasts:

railscasts.com 01 Jul '12, 8pm

Cron is great for handling recurring tasks, but it is an external dependency with a crazy syntax. In this episode I show y...

For all the Russian-speaking devs Ruby OpenSour...

rubyflow.ru 02 Jul '12, 9am

Пока все мы с нетерпением ждем нового рауда Rails Rumble , появилась возможность посостязаться и даже получить классные пр...

Ruby Internals: Method Definition

rubyflow.com 02 Jul '12, 1am

Ruby Internals: Method Definition Posted by oscardb on July 02, 2012 — 0 comments Learn what happens behind the scenes whe...

More from Ruby Under a Microscope

rubyflow.com 29 Jun '12, 4pm

More from Ruby Under a Microscope Posted by patshaughnessy on June 29, 2012 — 0 comments This is an eBook I’m writing this...

Ruby is awesome. Anonymous Class Hacks:

blog.rubybestpractices.com 30 Jun '12, 11pm

Update: I came across an inlink to this page that was layering in advertisements in a frame. Luckily, there are technical ...

A new release of the HelpSpot Ruby Gem is avail...

rubygems.org 04 Jul '12, 2am

help_spot 0.0.9 API wrapper for HelpSpot install gem install help_spot Download Documentation Subscribe Stats Authors Jess...

To Ruby From Java:

ruby-lang.org 07 Jul '12, 1pm

Java is mature. It’s tested. And it’s fast (contrary to what the anti-Java crowd may still claim). It’s also quite verbose...

Ruby Best Practices - Practicing Ruby, The News...

blog.rubybestpractices.com 03 Jul '12, 4am

Welcome, Hacker News folks. If you find the following project worthwhile, I’d really appreciate an up vote so that I can r...

extend self in ruby

rubyflow.com 29 Jun '12, 2pm

extend self in ruby Posted by bigbinary on June 29, 2012 — 0 comments This blog discusses extend self in ruby with some pr...