Monday, October 24, 2011

jruby gem dependencies for rails 3.1.1

Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

add to Gemfile.rb
gem 'execjs'
gem 'therubyrhino'

Saturday, October 15, 2011

getting around the great chinese firewall

The easiest way to get around the Great Firewall is to use TOR. However TOR can be slow. The best way is to run your own http proxy and tunneling traffic encrypted through SSH.


Mac/Linux/Unix distributions usually already have an ssh client installed.
Create the ssh tunnel to the proxy server using the following command line:
% ssh -C username@server -L 8080:localhost:8000

Once you've successfully logged in, start a proxy server:
% ./proxy.py

You will see something like:


Any clients will be served...
Serving HTTP on 0.0.0.0 port 8000 ...


Next configure your web browser to use the proxy server which is browser dependent. Google on how to do this. You will need to configure your web browser to use "localhost" and port "8080" for the proxy server host and port.