-
Notifications
You must be signed in to change notification settings - Fork 213
OSX installation
Nick Roberts edited this page Feb 26, 2015
·
50 revisions
In order to work on LocalSupport on Mac, please fork and clone the project.
- Install Ruby 2.0.0
- Fork the http://github.com/AgileVentures/LocalSupport repo (fork button at top right of github web interface)
- Clone the new forked repo onto your dev machine
cd LocalSupport
- Install Qt webkit headers
Install Homebrew (if you don't have it already). If you do have Homebrew, run the following
brew update
after brew is installed or updated, type
brew install qt
Then you should be able to run gem install capybara-webkit -v '1.0.0' successfully.
- Install postgreSQL Type the following into command line
psql```
Then you should see this
psql (9.3.4) Type "help" for help. username=#
username should be your name. Next to that type the following
ALTER ROLE "postgres" WITH CREATEDB
1. Install X virtual frame buffer
`sudo apt-get install xvfb`
1. `git checkout develop`
1. Run `bundle install` to get the gems
1. Run the following to get the database set up and import seed data
```ruby
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:categories
bundle exec rake db:seed
bundle exec rake db:cat_org_import
bundle exec rake db:pages
bundle exec rake db:import:emails[db/emails.csv]
```
1. Follow the [Feature flags instructions](Feature-flags) 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](https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm)]
Debian 7 users can follow these instructions to launch Xvfb as daemon : [[Xvfb-on-Debian-7]]
## Run locally
and then 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`, 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
-------
* If you are having issues with PostgresQL - see [PostgreSQL install instructions](Installation#postgresql-install)
* If you are having issues innstalling Qt webkit headers- see [capybara-webkit gem](Installation#capybara-webkit-gem)