Thursday, January 23, 2014

Week 2: The Install is Half the Work

We left off last week with some errors installing postgres and with the intention of completing the Canvas install.

It turns out we just needed to update Homebrew ("brew update") to finish installing xmlsec1 and postgres.

Our next step was to install RubyGems and Bundler, but the version of RVM (1.9.3) that we installed included these already, so we just checked to ensure that they had made it to the right place:

wireless-10-146-97-126:~ Michelle$ which ruby
/Users/Michelle/.rvm/rubies/ruby-1.9.2-p320/bin/ruby
wireless-10-146-97-126:~ Michelle$ which gem
/Users/Michelle/.rvm/rubies/ruby-1.9.2-p320/bin/gem
wireless-10-146-97-126:~ Michelle$ which bundler
/Users/Michelle/.rvm/gems/ruby-1.9.2-p320@global/bin/bundler
wireless-10-146-97-126:~ Michelle$ echo $GEM_HOME
/Users/Michelle/.rvm/gems/ruby-1.9.2-p320
wireless-10-146-97-126:~ Michelle$ echo $GEM_PATH
/Users/Michelle/.rvm/gems/ruby-1.9.2-p320:/Users/Michelle/.rvm/gems/ruby-1.9.2-p320@global


Looks good!

Since we're using PostgresSQL, we needed to tell canvas to ignore MySQL with :
bundle install --without mysql
However, the Bundler we installed was not compatible with the Gem version we were using, so we had to downgrade it to an older version, a solution we found here. We could then execute the command like so: "bundle _1.3.5_ install --without mysql"

Continuing with the Quick Start guide, we ran into a js:build error during Database population. It seems we just needed to install jsnode manually ("brew install node"). 

We are now nearing the final steps of installation. We decided to skip over testing database configuration and the performance tweaks as they leant little purpose to our goal, so our next hiccup was running the script/server daemon.  The error crashed our entire terminal shell with little clue as to why. 

This proved to be an excellent opportunity to consult the Canvas forum.  We were able to glean some advice from more experienced software engineers, but have not yet found a solution. 


Goals for the upcoming week:
  1. Find solution to server error (via Canvas forum, Ruby forum, and/or general Google search)
  2. Check out MathJax for front end equation display inspiration
  3. Begin planning out Python functions to:
    1. Check roots of a polynomial
    2. Ensure user input of roots is in factored form
    3. Check if polynomial is factor of another polynomial
    4. Generally process input --> get a polynomial from String, etc.

Monday, January 20, 2014

Week 1-ish: The Newb at Work

Welcome! 

This is the official blog space for Itamar Gal and Michelle Lawrence's 2014 research project. Here you will find a detailed description of our attempt to:



  1. Develop self-contained learning modules using the Python SymPy package
  2. Integrate Python/SymPy with a CMS (Canvas in this case) via LTI

I, Michelle, will be logging our weekly progress in a step-by-step format both for my record-keeping benefit and as an open-source tool for anyone wanting to try something similar.  Some of these steps may seem embarrassingly straightforward to those more experienced coders and researchers, but I'm still a newb, so bear with me. 

Week 1: 


Our first steps involved acquiring the proper development tools. Using Homebrew we installed the following: 



  1. SymPy
  2. Canvas which involved:
    1. Installing RVM to run the required version of Ruby (1.9.3)
    2. Xcode development tools
    3. Postgres and the xmlsec library - just using the command line:


$ brew install xmlsec1 postgresql
We ran into a few problems during install. For instance, the proper RVM wouldn't install before Xcode was on the system completely. If you download Xcode via the terminal, make sure to launch it once to complete the install process. Once it has been launched, go into its Preferences, select the Downloads tab, and click "Install" next to the Command Line Tools package. Otherwise, the proper RVM cannot finish installing, a solution I found here.

I'm still having some additional errors downloading Postgres, which are still being parsed. Often the easiest way to find a solution to an error or bug is simply to Google it. 

Goals for the upcoming week:
  1. Finish installing tools
  2. Begin writing Python functions to:
    1. Check roots of a polynomial
    2. Ensure user input of roots is in factored form
    3. Check if polynomial is factor of another polynomial
    4. Generally process input --> get a polynomial from String, etc.
Stay tuned!