Open source version of Northwestern University Core Facility Management Software
Welcome to NUcore! This guide will help you get a development environment up and running. It makes a few assumptions:
- You write code on a Mac.
- You have a running Oracle or MySQL instance with two brand new databases. (Oracle setup instructions here.)
- You have the following installed:
Spin it up
Download the project code from Github
git clone firstname.lastname@example.org:tablexi/nucore-open.git nucore
cd nucore bundle install
Configure your databases
cp config/database.yml.mysql.template config/database.yml
Edit the adapter, database, username, and password settings for both the development and test DBs to match your database instance
Configure your secrets
cp config/secrets.yml.template config/secrets.yml rake secret
- Paste the output from
Set up databases
Seed your development database
Configure your file storage
By default, files are stored on the local filesystem. If you wish to use Amazon's S3 instead, create a local settings override file such as
config/settings/production.local.ymland include the following, substituting your AWS settings:
paperclip: storage: fog fog_credentials: provider: AWS aws_access_key_id: YOUR_S3_KEY_GOES_HERE aws_secret_access_key: YOUR_S3_SECRET_KEY_GOES_HERE fog_directory: YOUR_S3_BUCKET_NAME_GOES_HERE fog_public: false path: ":class/:attachment/:id_partition/:style/:safe_filename"
Start your server
demo:seedcreates several users with various permissions. All users have the default password of
Email/username Role email@example.com Admin firstname.lastname@example.org PI email@example.com Normal User firstname.lastname@example.org Facility Staff email@example.com Facility Director
Play around! You're running NUcore!
delayed_jobto support in-browser email previews.
Run delayed jobs indefinitely in the background:
Or run delayed jobs once for one-off jobs:
NUcore uses Rspec to run tests. Try any of the following from NUcore's root directory.
To run all tests (this will take awhile!) rake spec
To run just the model tests rake spec:models
To run just the controller tests rake spec:controllers
The following modules are provided as optional features via
Rails engines. These are enabled
by adding the appropriate engine to your Gemfile (all are on by default). They
exist in the
- Accept Credit Cards & Purchase Orders (c2po)
- Connect to Dataprobe Power Relays (dataprobe)
- Link orders together as a Project (projects)
- Sanger Sequencing order form and well plate management
- Split charges between different accounts
- Authenticate against an LDAP server
- Authenticate with SSO via SAML
Engine-specific migrations should live in the engine's
db/migrate directory and
use an engine initializer to add that path to the list of paths Rails checks. If
you need to disable an engine, you can undo all of the engine's migrations with
rake engines:db:migrate_down[ENGINE_NAME] task.
There are valuable resources in the NUcore's doc directory.
Want to conform to the project's established coding standards? See coding_standards.md
Want to know more about the instrument pricing model? See instrument_pricing.md
Need to move changes between nucore-open and your fork? See HOWTO_forks.txt
Need help getting Oracle running on your Mac? See HOWTO_oracle.md
Want to authenticate users against your institution's LDAP server? See the
Need to use a 3rd party service with your NUcore? See HOWTO_external_services.txt
Need to asynchronously monitor some aspect of NUcore? See HOWTO_daemons.txt