Giter VIP home page Giter VIP logo

Otwarte Zabytki

License

The project is licensed under a 3-clause BSD license. You can find the whole text of the license here.

General system requirements

Setup basically doesn't different from a standard rails application, probably you will run the commands below:

cp config/database.yml.example config/database.yml
# create database and configure users

bundle install

# load database dump if you have
gunzip -c %m_%d_%Y.sql.gz | script/rails db

bundle exec rake db:migrate
bundle exec rake db:seed

# reindex relic index
bundle exec rake relic:reindex 

Application setup for OS X

requirements

  • homebrew
  • ruby 1.9.2 or 1.9.3, below than 2.0.0
  • git
  • bundle
  • web browser e.g. chrome or safari

installation

brew update
brew install elasticsearch memcached postgresql imagemagick aspell --lang=pl
brew pin elasticsearch postgresql

cp config/database.yml.example config/database.yml
# create database and configure users

bundle install

# load database dump if you have
gunzip -c %m_%d_%Y.sql.gz | script/rails db

bundle exec rake db:migrate
bundle exec rake db:seed

Setup ElasticSearch (we use 0.20.2)

bundle exec rake relic:reindex

[Attention] Updating settings.yml

After editing this file you have to edit also variables.js.etc in assets. If you don't do that, the settings won't be applied.

Dumping database

pg_dump -h localhost -cxOWU user_name db_name | gzip > (date +"%m_%d_%Y").sql.gz

Redactor.js license

Redactor.js is proprietary software, you can disable it by issuing following commands:

rm $(find app -type f -name 'redactor*')
sed -i '.bak' '/redactor/d' $(grep -l -E '/redactor|)\.redactor' -r app)

I18n translations

  • Every new translation key add to pl.yml with default value.
  • On deploy default values are copied to database via bash rake tolk:sync.
  • To change already added translation key use tolk or inline interface (you must be an admin).
  • From time to time you want to pull production translations and save in pl.yml bash script/load_production_translations command make dump on production load it to local db run sync and dump merged yml file.

Troubleshooting

Problem:

500 : {"error":"SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures {[_na_][development-relics][0]: No active shards}{[_na_][development-relics][1]: No active shards}{[_na_][development-relics][2]: No active shards}{[_na_][development-relics][3]: No active shards}{[_na_][development-relics][4]: No active shards}]","status":500}

Solution:

rm -rf /usr/local/var/elasticsearch/elasticsearch_$(whoami)/*
elasticsearch restart

Code documentation

  gem install yard redcarpet

in application directory run

  yard -o public/system/doc

current code documentation is available on http://rubydoc.info/github/otwartezabytki/otwartezabytki/master/frames

API documentation

is available on http://otwartezabytki.pl/apidoc/index.html

Otwarte Zabytki's Projects

tolk icon tolk

Tolk is a web interface for doing i18n translations packaged as an engine for Rails 3.2 applications

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.