Skip to content
rafd edited this page May 17, 2011 · 2 revisions

Creating an Admin User

Register a user using the web interface. In terminal, in app folder:

rails c
>> u = User.last
# check that it's you
>> u.roles = [:admin, :student]
>> u.save

Turning local/dev search index on

In terminal, in app folder:

rake sunspot:solr:start

Sunspot

Re-indexing all documents with Sunspot

In terminal:

rails c production
>> Sunspot.remove_all
>> Sunspot.index(Instructor.all)
>> Sunspot.index(Resource.all)
>> Sunspot.index(CourseInstance.all)
>> Sunspot.index(Collection.all)
>> Sunspot.commit

Restarting Sunspot on server

sunspot-solr start --port=8983 --data-dir=/tmp/heroku_solr_data --log-file=/tmp/heroku_solr.log --log-level=WARNING