This is a Rails 3 web application and API for Falling Fruit, built for use with a PostgreSQL + PostGIS database.
Falling Fruit co-founders Caleb Phillips and Ethan Welty. More info at fallingfruit.org/about.
If you want to help with development, feel free to fork the project. If you have something to submit upstream, send a pull request from your fork. Cool? Cool!
The website is still live at old.fallingfruit.org but is being phased out by the new https://fallingfruit.org (falling-fruit-web). It is still used by older mobile app installations and for some admin tools which are not implemented in the new website. The repository is still used for database management, which has not yet been migrated to falling-fruit-api.
PostgreSQL (15) & PostGIS (3.3), for example with Homebrew:
brew install postgresql@15 postgisbrew install imagemagickRuby (2.3.4), for example with rbenv:
rbenv install 2.3.4
rbenv shell 2.3.4Bundler (1.17.3) with RubyGems:
gem install bundler -v 1.17.3Project gems with Bundler:
bundle installInitialize the configuration files:
cp config/database.yml.dist config/database.yml
cp config/s3.yml.dist config/s3.yml
cp config/initializers/credentials.rb.dist config/initializers/credentials.rb
cp config/initializers/secret_token.rb.dist config/initializers/secret_token.rb
cp .phraseapp.yml.dist .phraseapp.ymlAdd a desired development database name and your database username, password, and port to config/database.yml.
Add Amazon S3 and Google API credentials to config/s3.yml and config/initializers/credentials.rb.
If working with translations, add Phrase credentials to .phraseapp.yml.
Create and structure the database, then seed it with db/seeds.rb:
rake db:create
rake db:migrate
rake db:seedInstall and start the Falling Fruit API.
Finally, start the web server and navigate to localhost:3000:
thin startWebsite translations are managed on the Phrase project Falling Fruit (web). To contribute, email us (info@fallingfruit.org) and we'll add you as a translator.
Install the Phrase CLI:
brew install phrase-cli
cp .phraseapp.yml.dist .phraseapp.ymlAdd your Phrase access token to .phraseapp.yml.
In the Falling Fruit (web)
project, select the default locale (English/en), and add a new translation key.
If the same word or phrase appears often, add it as glossary.<key name>.
Then, update your translation files (in config/locales/*.yml):
phrase pullUse the translation key in your template.
<!-- Instead of adding text to the markup: -->
<span>Map</span>
<!-- Evoke the translation key value with translate() -->
<span><%= translate("glossary.map") %></span>