metamaps--metamaps/README.rdoc

52 lines
2.8 KiB
Text
Raw Normal View History

2013-03-22 01:33:59 +00:00
==How to code in Metamaps
2013-01-21 02:09:38 +00:00
Here are the important folders/files:
config/database.yml: This file is your database configuration. If it doesn't exist, copy it from config/database.yml.default and then get it set up. config/database.yml is in .gitignore
app/assets/javascripts/application.js: Global Javascript
2013-03-01 00:39:42 +00:00
2013-01-21 02:09:38 +00:00
app/assets/javascripts/Jit/*: These files handle all code that uses the Javascript Infovis Toolkit, so realistically, most code for laying stuff out is in here.
app/assets/controllers/*: These files define actions you can do on the different database objects. So for instance, what happens when you edit a Synapse? Check in app/assets/controllers/synapse_controller.rb, in the edit block
app/assets/views/*.html.erb: Files in here define either html that is displayed when a certain action is called (like edit, or create) on a thing. E.G. app/assets/views/topic/new.html.erb would have a form for creating a new topic. We don't use that way very much anymore though. "Partial" views can be called elsewhere in ruby code and are prefixed with an underscore. So we focus more on the files starting with an underscore. Read through the comments at the top of each file to understand what they all do.
app/assets/views/*.js.erb: Javascript that is called in response to, e.g., editing or creating a topic, synapse, etc.
Setting up the database:
1) Copy database.yml.default to database.yml
2013-03-22 01:33:59 +00:00
- Then you'll need to figure out how to configure it to work with Postgresql (which you need to install - try Herokuapp's exe or app)
2) In a terminal:
$ rake db:create
2014-05-01 00:44:54 +00:00
$ rake db:schema:load
$ rake db:fixtures:load
Running the server:
2013-03-22 01:33:59 +00:00
$rails s #runs the server
$
2014-05-01 00:44:54 +00:00
$rails c #gives you an interactive console
Navigate your browser to localhost:3000 once you have the server running
==Installing on Ubuntu
I had a lot of trouble installing on Ubuntu
I had to install postgresql and libpq-dev. I had to do $rvm reinstall ruby-1.9.3-p125
execjs complained there was no runtime, so I added gem 'therubyracer' to the Gemfile
2013-10-17 14:36:17 +00:00
==License
Metamaps.cc, a visual knowledge communication engine.
2014-02-12 22:59:41 +00:00
Copyright (C) 2014 Topos FFO
2013-10-17 14:36:17 +00:00
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see [http://www.gnu.org/licenses/].
With any questions or comments, contact Ishan Shapiro and Connor Turland at team@metamaps.cc.