-
Notifications
You must be signed in to change notification settings - Fork 4
Home
A development environment will enable you to run a local copy of BIP, perform development work and introduce changes in the database.
Brassica Information Portal is a Ruby on Rails 4 application. The base requirements for setting up and operating a local deployment are given below:
- Ruby (MRI) 2.2.0 or later
- PostgreSQL 9.1 or later (local server): postgresql, libpq-dev
- Elasticsearch 1.4.3, Java 7
In order to set up a development environment, first install Ruby and PostgreSQL in a manner appropriate to your system, then clone the GIT repository to your local computer. You need to configure your Rails application deployment - as a minimum, you need to set up conf/database.yml
to point to your local database instance (see http://guides.rubyonrails.org/configuring.html for detailed instructions on how to do this.
To setup an ElasticSearch server, see instruction in the main README file: https://github.com/eSpectrum-IT/brassica
- As mentioned before, you need to have the elastic search server up and running, so please install it and run:
-
sudo service elasticsearch start
(or an equivalent in your OS)
-
-
rake app:bootstrap
(and say yes. when prompted)
Now, you are ready to run the local development server and it should work. In ase you'd also like to run rspec
specification tests, you need to:
-
rake db:test:prepare
(this will reuse development db schema, not data, for your test suite) rspec
In any case when Ruby complains about rake
version or similar, it might help to prepend all rake
or rspec
calls with bundle exec
"localization", like:
bundle exec rake db:test:prepare
Out-of-the-box PSQL setup is fairly conservative. If you'd like to make it a little bit more efficient (and resources consuming), see Piotr's ideas here: https://github.com/eSpectrum-IT/brassica/issues/169.