I try to update from Version 1.2.0.beta5 to 1.2.0.beta6 using Discourse upgrade feature in admin control panel. However, it failed to execute the upgrading.
Here is the log:
$ cd /var/www/discourse && git fetch && git reset --hard HEAD@{upstream}
Checking out files: 22% (1570/7114)
Checking out files: 23% (1637/7114)
Checking out files: 24% (1708/7114)
Checking out files: 25% (1779/7114)
Checking out files: 26% (1850/7114)
Checking out files: 27% (1921/7114)
Checking out files: 28% (1992/7114)
Checking out files: 29% (2064/7114)
Checking out files: 30% (2135/7114)
Checking out files: 31% (2206/7114)
Checking out files: 32% (2277/7114)
Checking out files: 33% (2348/7114)
Checking out files: 34% (2419/7114)
Checking out files: 35% (2490/7114)
Checking out files: 36% (2562/7114)
Checking out files: 37% (2633/7114)
Checking out files: 38% (2704/7114)
Checking out files: 39% (2775/7114)
Checking out files: 40% (2846/7114)
Checking out files: 41% (2917/7114)
Checking out files: 42% (2988/7114)
Checking out files: 43% (3060/7114)
Checking out files: 44% (3131/7114)
Checking out files: 44% (3166/7114)
Checking out files: 45% (3202/7114)
Checking out files: 46% (3273/7114)
Checking out files: 47% (3344/7114)
Checking out files: 48% (3415/7114)
Checking out files: 49% (3486/7114)
Checking out files: 50% (3557/7114)
Checking out files: 51% (3629/7114)
Checking out files: 52% (3700/7114)
Checking out files: 53% (3771/7114)
Checking out files: 54% (3842/7114)
Checking out files: 55% (3913/7114)
Checking out files: 56% (3984/7114)
Checking out files: 57% (4055/7114)
Checking out files: 58% (4127/7114)
Checking out files: 59% (4198/7114)
Checking out files: 60% (4269/7114)
Checking out files: 61% (4340/7114)
Checking out files: 62% (4411/7114)
Checking out files: 63% (4482/7114)
Checking out files: 64% (4553/7114)
Checking out files: 65% (4625/7114)
Checking out files: 66% (4696/7114)
Checking out files: 67% (4767/7114)
Checking out files: 68% (4838/7114)
Checking out files: 69% (4909/7114)
Checking out files: 70% (4980/7114)
Checking out files: 71% (5051/7114)
Checking out files: 72% (5123/7114)
Checking out files: 73% (5194/7114)
Checking out files: 74% (5265/7114)
Checking out files: 75% (5336/7114)
Checking out files: 75% (5360/7114)
Checking out files: 76% (5407/7114)
Checking out files: 77% (5478/7114)
Checking out files: 78% (5549/7114)
Checking out files: 79% (5621/7114)
Checking out files: 80% (5692/7114)
Checking out files: 81% (5763/7114)
Checking out files: 82% (5834/7114)
Checking out files: 83% (5905/7114)
Checking out files: 84% (5976/7114)
Checking out files: 85% (6047/7114)
Checking out files: 86% (6119/7114)
Checking out files: 87% (6190/7114)
Checking out files: 88% (6261/7114)
Checking out files: 89% (6332/7114)
Checking out files: 90% (6403/7114)
Checking out files: 91% (6474/7114)
Checking out files: 92% (6545/7114)
Checking out files: 93% (6617/7114)
Checking out files: 93% (6687/7114)
Checking out files: 94% (6688/7114)
Checking out files: 95% (6759/7114)
Checking out files: 96% (6830/7114)
Checking out files: 97% (6901/7114)
Checking out files: 98% (6972/7114)
Checking out files: 99% (7043/7114)
Checking out files: 100% (7114/7114)
Checking out files: 100% (7114/7114), done.
HEAD is now at 16465ed FEATURE: search your bookmarks using in:bookmarks
********************************************************
*** Please be patient, next steps might take a while ***
********************************************************
$ bundle install --deployment --without test --without development
Fetching source index from https://rubygems.org/
Using rake 10.4.2
Using CFPropertyList 2.2.8
Using i18n 0.6.11
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby -r ./siteconf20150205-26262-1dc3px6.rb extconf.rb
Cannot allocate memory - /usr/local/bin/ruby -r ./siteconf20150205-26262-1dc3px6.rb extconf.rb 2>&1
Gem files will remain installed in /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/json-1.8.2 for inspection.
Results logged to /var/www/discourse/vendor/bundle/ruby/2.0.0/extensions/x86_64-linux/2.0.0-static/json-1.8.2/gem_make.out
An error occurred while installing json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.
What should I do to upgrade?
Thanks