Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Email 2

Sam Joseph edited this page Dec 3, 2015 · 2 revisions

I'm following up with a deploy of a new box.

I just checked new and old boxes for disk space:

OLD:

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.8G  2.7G  4.8G  36% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            3.7G  8.0K  3.7G   1% /dev
tmpfs           752M  216K  752M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.7G     0  3.7G   0% /run/shm
none            100M     0  100M   0% /run/user
/dev/xvdb        30G   45M   28G   1% /mnt

NEW:

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.8G  1.2G  6.2G  16% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            3.7G  8.0K  3.7G   1% /dev
tmpfs           752M  196K  752M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.7G     0  3.7G   0% /run/shm
none            100M     0  100M   0% /run/user
/dev/xvdb        30G   45M   28G   1% /mnt

So it looks like we are not critically running out of space just yet.

I modified the install script at https://github.com/saasbook/rag/blob/master/ubuntu-install.sh so that it points to the saasbook master rather than your fork of it and have set it running on a fresh box:

After entering the ssh key I got these errors:

$ sudo chmod 0600 id_rsa
chmod: cannot access ‘id_rsa’: No such file or directory

$ source /usr/local/rvm/scripts/rvm
./install.sh: line 29: /usr/local/rvm/scripts/rvm: No such file or directory

$ cd /home/ubuntu/rag/

$ git checkout autograder_engine_refactor
Branch autograder_engine_refactor set up to track remote branch autograder_engine_refactor from origin.
Switched to a new branch 'autograder_engine_refactor'

$ rvm use 2.2.2
./install.sh: line 29: rvm: command not found

$ gem install bundler
./install.sh: line 29: gem: command not found

$ bundle-install-ifmissing
./install.sh: line 20: bundle: command not found
$ bundle install
./install.sh: line 34: bundle: command not found

I've made a few fixes to the script, and got to the bundle bit, but that fails like so:

Installing json 1.8.3 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/ubuntu/.rvm/rubies/ruby-2.2.2/bin/ruby -r ./siteconf20151201-7297-17zf7n9.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.so
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
make: *** [generator.so] Error 1

make failed, exit code 2

Gem files will remain installed in /home/ubuntu/.rvm/gems/ruby-2.2.2/gems/json-1.8.3 for inspection.
Results logged to /home/ubuntu/.rvm/gems/ruby-2.2.2/extensions/x86_64-linux/2.2.0/json-1.8.3/gem_make.out
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
ubuntu@ip-10-182-65-242:~/rag$

fixed that with:

$ sudo apt-get install libgmp3-dev # http://stackoverflow.com/questions/21603772/usr-bin-ld-cannot-find-lgmp

That allowed the bundle to complete and then I was able to copy over the config from the main grader into config/config.yml

I now have a new grader up on the production queue, and that seems to be working. The old grader had got totally stuck so I have taken that one offline for the moment.

Clone this wiki locally