Skip to content
An open peer review site for arXiv preprints
Ruby HTML CoffeeScript CSS JavaScript
Branch: master
Clone or download
Latest commit c9c3e62 Jul 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db Implements 'comment locking' on papers May 23, 2017
lib go back a week if no papers; prevents failure of categories where a n… Nov 29, 2017
log Fix search when logged out Jul 19, 2013
public braneshop Mar 4, 2019
script Initial creation of new scirate application Feb 5, 2012
spec no more downvotes; fixes #358 Jun 16, 2018
vendor Use font-awesome-rails gem May 18, 2015
.gitignore ignore ruby version Jun 10, 2018
.rspec Set up RSpec testing environment with Guard and Spork Feb 21, 2012
.travis.yml libqtwebkit dep May 23, 2017
Gemfile update versions Nov 29, 2017
Gemfile.lock
Guardfile Replace haml with slim in Guardfile Apr 15, 2014
MIT-LICENSE
README.markdown Noon is taking over as maintainer! Mar 15, 2017
Rakefile
config.ru Disable garbage collector during request Jun 11, 2014
deploy.rb Update deploy script Aug 30, 2014
settings.rb adding econ as a top-level folder Nov 29, 2017

README.markdown

SciRate

Build Status Coverage Status

SciRate is an open source rating and commenting system for arXiv preprints. Papers are upvoted and discussed by the community, and we sometimes play host to more in depth peer review.

Bug reports and feature requests should be submitted as GitHub issues.

Setting up for development

SciRate runs on Ubuntu 14.04 in production. Development in other environments is possible, but this guide will assume you are running some variant of Debian.

We currently use Ruby 2.2.1 and Rails 4.2. To install this version of Ruby and RVM:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby=2.2.1
rvm use 2.2.1 --default

You will also need some native packages:

sudo apt-get install git postgresql libpq-dev libxml2-dev libxslt-dev nodejs libodbc1 libqt4-dev openjdk-6-jre libqt5webkit5-dev

Our backend depends on Elasticsearch to sort through all the papers:

wget -O /tmp/elasticsearch.deb https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.1.deb
sudo dpkg -i /tmp/elasticsearch.deb
sudo update-rc.d elasticsearch defaults 95 10
sudo service elasticsearch start

Finally, clone the repository and install the Ruby gem dependencies:

git clone git@github.com:scirate/scirate
cd scirate
bundle install

SciRate is now set up for development! However, you'll also want a database with papers to fiddle with.

Setting up the database

If you've just installed postgres, it'll be easiest to use the default 'peer' authentication method. Create a postgres role for your user account:

sudo -u postgres createuser --superuser $USER

Copy the example database configuration file (:

cp config/database.yml.example config/database.yml

If using peer authentication, you won't need to edit this file.

Then:

rake db:setup
rake es:migrate
rake arxiv:feed_import
rails server

This will initialize the database and Elasticsearch, download the basic feed layout, and start the server.

Populating the database

rake arxiv:oai_update

When run for the first time, this will download and index paper metadata from the last day. Subsequent calls will download all metadata since the last time. The production server runs this task every day to keep the database in sync.

Testing

There is a fairly comprehensive series of unit and integration tests in spec. Running rspec in the top-level directory will attempt all of them.

Acknowledgements

You can’t perform that action at this time.