Install ruby on rails on VPS
===

I managed to install it locally without any problem but on my VPN I can't follow the guide at all. Execution stops at gem install rails -v 3.2.3 with an error that I can't seem to fix after googling for hours.


    gem install rails -v 3.2.3
    ========================================
    Fetching: i18n-0.6.0.gem (100%)
    Fetching: multi_json-1.3.6.gem (100%)
    Fetching: activesupport-3.2.3.gem (100%)
    Fetching: builder-3.0.0.gem (100%)
    Fetching: activemodel-3.2.3.gem (100%)
    Fetching: rack-1.4.1.gem (100%)
    Fetching: rack-cache-1.2.gem (100%)
    Fetching: rack-test-0.6.1.gem (100%)
    Fetching: journey-1.0.4.gem (100%)
    Fetching: hike-1.2.1.gem (100%)
    Fetching: tilt-1.3.3.gem (100%)
    Fetching: sprockets-2.1.3.gem (100%)
    Fetching: erubis-2.7.0.gem (100%)
    Fetching: actionpack-3.2.3.gem (100%)
    Fetching: arel-3.0.2.gem (100%)
    Fetching: tzinfo-0.3.33.gem (100%)
    Fetching: activerecord-3.2.3.gem (100%)
    Fetching: activeresource-3.2.3.gem (100%)
    Fetching: mime-types-1.19.gem (100%)
    Fetching: polyglot-0.3.3.gem (100%)
    Fetching: treetop-1.4.10.gem (100%)
    Fetching: mail-2.4.4.gem (100%)
    Fetching: actionmailer-3.2.3.gem (100%)
    Fetching: thor-0.14.6.gem (100%)
    Fetching: rack-ssl-1.3.2.gem (100%)
    Fetching: json-1.7.4.gem (100%)
    Building native extensions.  This could take a while...
    ERROR:  Error installing rails:
    	ERROR: Failed to build gem native extension.
    
            /home/app-user/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
    creating Makefile
    
    make
    compiling generator.c
    generator.c: In function 'isArrayOrObject':
    generator.c:867:5: warning: suggest parentheses around '&&' within '||'
    linking shared-object json/ext/generator.so
    
    make install
    /usr/bin/install -c -m 0755 generator.so /home/app-user/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.4/lib/json/ext
    installing default generator libraries
    
    
    Gem files will remain installed in /home/app-user/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.4 for inspection.
    Results logged to /home/app-user/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.4/ext/json/ext/generator/gem_make.out

The guide I'm using: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
I tried other guides as well. Same error pops out. Any ideas?