Rails API for mdTranslator: mdtranslator.adiwg.org
Assumes rvm is installed
source $HOME/.rvm/scripts/rvm
rvm install 2.1.10 rvm use 2.1.10
gem install bundler
bundle install
export SECRET_KEY_BASE=[your secret key base]
see http://stackoverflow.com/questions/23180650/how-to-solve-error-missing-secret-key-base-for-production-environment-rai or other resources
rails server
Click on "demo" link to do some metadata translations
docker run -d -e SECRET_KEY_BASE= -e RAILS_SERVE_STATIC_FILES=true -p 8080:8080 mdtoolkit/mdtranslator-rails:2.18.2
One way you can generate a secret base key is with the following command
RAILS_ENV=production rake secret
bundle
to install
bundle exec rails server
to run the server
Once the writer has been added to the mdTranslator, including the command line interface, follow these instructions:
- Navigate to
app/views/api/v3/demos/show.html.erb
- Add an
<option>
tag to the<select>
dropdown menu. Note that the lists for the readers and writers is above where it says "Select a Reader" or "Select a Writer" (at first glance of the code this can be confusing). - Navigate to
app/models/option.rb
- Add your writer to the list of writers. Be sure it matches the format used to identify that writer from the CLI.