Skip to content

Repository files navigation

Status

Falling Fruit Legacy

This is a Rails 3 web application and API for Falling Fruit, built for use with a PostgreSQL + PostGIS database.

Who is responsible?

Falling Fruit co-founders Caleb Phillips and Ethan Welty. More info at fallingfruit.org/about.

How can I help?

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!

Status

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.

Development

Install PostgreSQL, Ruby, and dependencies

PostgreSQL (15) & PostGIS (3.3), for example with Homebrew:

brew install postgresql@15 postgis

ImageMagick:

brew install imagemagick

Ruby (2.3.4), for example with rbenv:

rbenv install 2.3.4
rbenv shell 2.3.4

Bundler (1.17.3) with RubyGems:

gem install bundler -v 1.17.3

Project gems with Bundler:

bundle install

Initialize 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.yml

Add 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.

Start the app

Create and structure the database, then seed it with db/seeds.rb:

rake db:create
rake db:migrate
rake db:seed

Install and start the Falling Fruit API.

Finally, start the web server and navigate to localhost:3000:

thin start

Translation

For translators

Website 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.

For developers

Install the Phrase CLI:

brew install phrase-cli
cp .phraseapp.yml.dist .phraseapp.yml

Add your Phrase access token to .phraseapp.yml.

Add a new translation

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 pull

Use 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>

About

Rails website, database, and API for Falling Fruit

Topics

Resources

Stars

83 stars

Watchers

8 watching

Forks

Used by

Contributors

Languages