Skip to content
Sam Joseph edited this page May 17, 2016 · 50 revisions

Notes on OSX installation

In order to work on LocalSupport on Mac, please fork and clone the project.

  1. Install RVM.

  2. Install Ruby 2.3.0.

  3. Fork the http://github.com/AgileVentures/LocalSupport repo (fork button at top right of github web interface).

  4. Clone the new forked repo onto your dev machine.

  5. cd LocalSupport.

  6. Install Qt webkit headers. Install Homebrew (if you don't have it already). If you do have Homebrew, run brew update after brew is installed or updated, type brew install qt. This will allow you to install capybara-webkit -v '1.0.0' successfully.

  7. Install postgreSQL. Type psql into command line. Then you should see this:

     psql (9.3.4)
     Type "help" for help.
     username=#
    

Next to that type ALTER ROLE "postgres" WITH CREATEDB.

  1. git checkout develop.

  2. Run bundle install to get the gems.

  3. Run bower install to get remaining dependencies.

  4. Run the following to get the database set up and import seed data (Note: db:setup is a custom task that invokes all required import and seeds. )

    bundle exec rake db:create
    bundle exec rake db:migrate
    bundle exec rake db:setup
  5. Follow the Feature flags instructions so that incomplete features run. If you hit problems, ask us on Slack chat.

[Note that rvm can be extremely helpful for managing ruby versions. Installing rvm on Ubuntu]

Debian 7 users can follow these instructions to launch Xvfb as daemon : Xvfb-on-Debian-7

Run locally

After that, in principle you can run rails server and see that app running locally.

The db/seeds.rb task that you ran added some organizations and a test user that you can experiment with. Read that file for more information.

Run tests

Also you should run the specs and cucumber features to make sure your installation is solid. For confidence, you shall prepare the test database first by running rake db:test:prepare(not needed in ruby starting from 2.0.0), then run tests using following commands:

bundle exec rake spec
bundle exec rake cucumber

and then when you start any BDD or TDD ensure autotest is running in the background:

bundle exec rake autotest

After that try running bundle install again.

Issues