CyberAula / vish

ViSH, an open source e-Learning platform
http://vishub.org
GNU Affero General Public License v3.0
134 stars 64 forks source link

recsys_development #78

Closed spheregenomics closed 11 years ago

spheregenomics commented 11 years ago

What are the recsys_development and recsys_test databases in the database.yml.example file? Does Vish need two databases for development and two for test?

spheregenomics commented 11 years ago

From the example database.yml.example file:

development: 4 adapter: mysql2 5 database: vish_development 6 encoding: utf8 7 username: root 8 password: 9 socket: /var/run/mysqld/mysqld.sock 10
11 recsys_development: 12 adapter: mysql2 13 database: vish_recsys_development 14 encoding: utf8 15 username: root 16 password: 17 socket: /var/run/mysqld/mysqld.sock

rafaelgg commented 11 years ago

The recommender system (hereon recsys, code at https://github.com/ging/vish_recsys ) runs as a separate process and populates the recsys_#{Rails.env}. database with information about users clusters and the resources and excursions assigned to them.

We should probably add a flag to disable the recsys altogether.

In the meantime, what we do in development is create a dummy db structure by feeding https://github.com/ging/vish/blob/master/db/recsys_db.sql to "rails db". The reason is it does not make a lot of sense to test the recsys in devel, at least without a user base.

We (well, @dgallego mostly) test the recsys in a pre-production deployment running a dump from the production user/resource DB.

Also (you guessed already) #79 is related to this.

I hope this helps, Rafa

spheregenomics commented 11 years ago

Hi Rafa, Thanks for the quick answer. I understand the workaround to be:

I'm building a system using the social stream gem and would like to use the vish database as a reference point. Cheers, Sean

rafaelgg commented 11 years ago

yes, you have to create the databases as follows:

vish_recsys_test vish_recsys_development vish_recsys_production

Then run the script for each of the environments as:

RAILS_ENV=test rails db < db/recsys_db.sql
RAILS_ENV=development rails db < db/recsys_db.sql
RAILS_ENV=production rails db < db/recsys_db.sql

(I hope this works as is, haven't really tried; use the mysql cli interface otherwise)

BR, Rafa

spheregenomics commented 11 years ago

Hi Rafa. It all worked. I'll update the installation instructions accordingly. Thanks for your help. Sean

spheregenomics commented 11 years ago

Installation instructions for OS X updated. https://github.com/ging/vish/wiki/Install-on-OS-X-10.8-with-MySQL