Creating a Service

From Ocean Framework Documentation Wiki
Jump to: navigation, search

Open a terminal window, navigate to the directory where you want to store the new service and execute

rails new my_service -m

If this reports that Rails isn't installed, you may have to tell RVM to use a specific gemset:

rvm use ruby-2.3.1@rails-4.2.8

Reply Y to all overwrite questions. Next change into the new directory:

cd my_service

RVM will detect, through the use of an automatically installed .rvmrc file, that you are entering this directory for the first time and will ask you whether it should trust its contents or not. Answer Y.

Next, tailor config/config.yml to your installation.

  • Set API_PASSWORD to the password you wish MyService to use when authenticating with the Auth service.
  • Set BASE_DOMAIN to your installation's base domain (e.g.

Then run the tests, which all should pass:


Your new service application is now ready. You should now commit it to source control.