This is the source for the Codebits 2014 project #517.
The costs of hosting a Solr server (using websolr for example), the size of the DB (~60Mb) and the lack of time to look for alternatives prevented us from having SubZam up and running on the web. If you can help us out with this, do get in touch!
However, we wanted you to try out SubZam, and that's the purpose of this repo. The instructions below will help you run your own copy.
- Ruby 2.1
- Ruby on Rails 4.1
- Apache Solr for Full-Text Search (through sunspot)
- OpenSubtitles.org for subtitles
- Google's Web Speech API
- Sapo's Ink
- Some other gems described in the Gemfile
Install Ruby ~> 2.0.0 (if necessary). RVM is optional, but highly recommended.
$ rvm install ruby-2.1.0
Clone the repo:
$ git clone https://github.com/pgaspar/subzam.git
$ cd subzam
Install bundler (if necessary)
$ gem install bundler
Install the gems:
$ bundle install
We've uploaded the same dataset we used on-stage. You can use this DB as your own.
$ cp db/development.sqlite3.backup db/development.sqlite3
Now that we have a decent Database, we need to index it with Solr. Let's start by starting the Solr server:
$ bundle exec rake sunspot:solr:run
# IMPORTANT: Wait until the solr directory has been created on your project root, then stop with Ctrl+C
We will now copy a solr configuration file so indexing works as we want and re-start the server:
$ cp -f solr_conf/schema.xml solr/conf/schema.xml
$ bundle exec rake sunspot:solr:run
Next, lets reindex:
$ bundle exec rake sunspot:solr:reindex
Once that's done, leave the Solr server running and start the Rails server (finally!):
$ rails s
Go to localhost:3000 and start searching 😄.
- Fork it ( http://github.com/pgaspar/subzam/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request