Skip to content
Sam Joseph edited this page May 2, 2013 · 7 revisions

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

  1. fork the http://github.com/tansaku/LocalSupport repo (fork button at top right of github web interface)
  2. clone the new forked repo onto your dev machine
  3. run bundle install to get the gems
  4. run rake db:migrate to get the database set up

and then in principle you can run rails server and see that app running locally - it won't have any data but you can add some through the web interface. Also you should run the specs and cucumber features to make sure your installation is solid:

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

You will likely encounter this error:

Installing rdoc (3.12.2) Invalid gemspec in [/usr/local/lib/ruby/gems/1.9.1/specifications/ZenTest-4.9.0.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]

Resolution described here: http://stackoverflow.com/questions/15006181/zentest-errors-preventing-autotest-from-running/15006306#15006306

One issue that someone has encountered is as follows:

I cloned the latest code on the github repo and running bundle install --without production seems to barf with many invalid gemspecs pointing to the 1.9.1 ruby installation seems I had to revert back to rubygem 1.8.24 And to get tests to pass, I had to run it via rake spec, which required editing gemfile to include 'rails-rspec' under :test, :development

As is suggested by starfry's comment on stackoverflow http://stackoverflow.com/questions/12159402/should-i-use-rake-spec-or-rspec-cant-get-rake-spec-to-work          

... it seems to use development db when you run via spec

As per the documentation for rspec-rails,

It needs to be in the :development group to expose generators and rake tasks without having to type RAILS_ENV=test.

Another issue that has been encountered is the following:

lack of JS runtime when running rake db:create' to the project 'LocalSupport'.

The following stackoverflow link contains the solution which is to add the execjs and therubyracer gems to the Gemfile, although we are not yet clear why this error sometimes crops up ...

http://stackoverflow.com/questions/9057475/rake-dbcreate-could-not-find-a-javascript-runtime

Clone this wiki locally