Code Monkey home page Code Monkey logo

pia-back's People

Contributors

brunto avatar dependabot-preview[bot] avatar dependabot[bot] avatar kaworu avatar kevin-atnos avatar kosmas58 avatar labocnil avatar syl-p avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pia-back's Issues

Transfer of data

Is any of the information stored on the DPIA transferred to CNIL, or everything is stored locally in the computer where the application is installed? (Windows machine)

bin/rake db:migrate error `method_missing': undefined method `public_file_server'

I'm installing Pia in a Debian server. I managed to install all required dependencies (not documented in home page) but i cannot fix this:
piauser@myserver:/var/www/pia/back-end$ RAILS_ENV=production bin/rake db:migrate
/usr/lib/ruby/vendor_ruby/rails/railtie/configuration.rb:95:in method_missing': undefined method public_file_server' for #Rails::Application::Configuration:0x007f2d92bc1cb0
Did you mean? public_send (NoMethodError)
from /var/www/pia/back-end/config/environments/production.rb:19:in block in <top (required)>' from /usr/lib/ruby/vendor_ruby/rails/railtie.rb:210:in instance_eval'
from /usr/lib/ruby/vendor_ruby/rails/railtie.rb:210:in configure' from /var/www/pia/back-end/config/environments/production.rb:1:in <top (required)>'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:274:in require' from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:274:in block in require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:240:in load_dependency' from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:274:in require'
from /usr/lib/ruby/vendor_ruby/rails/engine.rb:598:in block (2 levels) in <class:Engine>' from /usr/lib/ruby/vendor_ruby/rails/engine.rb:597:in each'
from /usr/lib/ruby/vendor_ruby/rails/engine.rb:597:in block in <class:Engine>' from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in instance_exec'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in run' from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:55:in block in run_initializers'
from /usr/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each' from /usr/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component'
from /usr/lib/ruby/2.3.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' from /usr/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from'
from /usr/lib/ruby/2.3.0/tsort.rb:421:in block in each_strongly_connected_component_from' from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in each'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in tsort_each_child' from /usr/lib/ruby/2.3.0/tsort.rb:415:in call'
from /usr/lib/ruby/2.3.0/tsort.rb:415:in each_strongly_connected_component_from' from /usr/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component'
from /usr/lib/ruby/2.3.0/tsort.rb:347:in each' from /usr/lib/ruby/2.3.0/tsort.rb:347:in call'
from /usr/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component' from /usr/lib/ruby/2.3.0/tsort.rb:226:in tsort_each'
from /usr/lib/ruby/2.3.0/tsort.rb:205:in tsort_each' from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in run_initializers'
from /usr/lib/ruby/vendor_ruby/rails/application.rb:352:in initialize!' from /var/www/pia/back-end/config/environment.rb:5:in <top (required)>'
from /usr/lib/ruby/vendor_ruby/spring/application.rb:92:in require' from /usr/lib/ruby/vendor_ruby/spring/application.rb:92:in preload'
from /usr/lib/ruby/vendor_ruby/spring/application.rb:143:in serve' from /usr/lib/ruby/vendor_ruby/spring/application.rb:131:in block in run'
from /usr/lib/ruby/vendor_ruby/spring/application.rb:125:in loop' from /usr/lib/ruby/vendor_ruby/spring/application.rb:125:in run'
from /usr/lib/ruby/vendor_ruby/spring/application/boot.rb:18:in <top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from -e:1:in

'

Can you give support?

Debian GNU/Linux 9
sudo bundle install >> OK
sudo gem pristine --all >> OK
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
Rails 5.0.6

Thanks

Erreur d'installation PIA-BACK

Bonjour,

J'ai une erreur lorsque je lance la commande bin/rake db:create

DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from <top (required)> at /var/lib/gems/2.3.0/gems/factory_girl-4.9.0/lib/factory_girl.rb:158)
root@SRVPIA:~/pia-back# /root/pia-back/config/environments/development.rb:46:in `block in <top (required)>': uninitialized constant ActiveSupport::EventedFileUpdateChecker (NameError)
        from /usr/lib/ruby/vendor_ruby/rails/railtie.rb:210:in `instance_eval'
        from /usr/lib/ruby/vendor_ruby/rails/railtie.rb:210:in `configure'
        from /root/pia-back/config/environments/development.rb:1:in `<top (required)>'
        from /usr/lib/ruby/vendor_ruby/rails/engine.rb:598:in `block (2 levels) in <class:Engine>'
        from /usr/lib/ruby/vendor_ruby/rails/engine.rb:597:in `each'
        from /usr/lib/ruby/vendor_ruby/rails/engine.rb:597:in `block in <class:Engine>'
        from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `instance_exec'
        from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `run'
        from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:55:in `block in run_initializers'
        from /usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
        from /usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
        from /usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
        from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in `each'
        from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in `tsort_each_child'
        from /usr/lib/ruby/2.3.0/tsort.rb:415:in `call'
        from /usr/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
        from /usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
        from /usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
        from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
        from /usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
        from /usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
        from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in `run_initializers'
        from /usr/lib/ruby/vendor_ruby/rails/application.rb:352:in `initialize!'
        from /root/pia-back/config/environment.rb:5:in `<top (required)>'
        from /usr/lib/ruby/vendor_ruby/spring/application.rb:92:in `require'
        from /usr/lib/ruby/vendor_ruby/spring/application.rb:92:in `preload'
        from /usr/lib/ruby/vendor_ruby/spring/application.rb:143:in `serve'
        from /usr/lib/ruby/vendor_ruby/spring/application.rb:131:in `block in run'
        from /usr/lib/ruby/vendor_ruby/spring/application.rb:125:in `loop'
        from /usr/lib/ruby/vendor_ruby/spring/application.rb:125:in `run'
        from /usr/lib/ruby/vendor_ruby/spring/application/boot.rb:18:in `<top (required)>'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from -e:1:in `<main>'

Pouvez-vous m'aider svp.
Cordialement,

Version plus recente de la documentation

Bonjour ,
Avez vous une version plus recente de la documentation "Installation.Runbook.V1.2.dox" sur Ubuntu 18.4 car je bloque déja sur l' etape 5 .2
bundle install .

1- Avec ruby 2.3.1 , j'ai l'erreur suivante
Your Ruby version is 2.3.1, but your Gemfile specified ~> 2.5.5

2- J'ai mis la version de ruby 2.5.5 , j'ai les erreurs suivantes
Traceback (most recent call last):
4: from /usr/local/rvm/gems/ruby-2.5.5/bin/ruby_executable_hooks:24:in <main>' 3: from /usr/local/rvm/gems/ruby-2.5.5/bin/ruby_executable_hooks:24:in eval'
2: from /usr/local/rvm/gems/ruby-2.5.5/bin/bundle:23:in <main>' 1: from /usr/local/rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0/rubygems.rb:308:in activate_bin_path'
/usr/local/rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
Merci pour votre aide
Lanto R.

Installation sur Windows Serveur 2012 R2

Bonjour,

J'aimerais savoir si il est possible d'avoir un tutoriel plus axé sur les systèmes Windows notamment serveurs 2012 R2.

En effet lors de l'installation sur une VM de test en suivant les étapes nous arrivons à accéder à la partie "Test" (le ligi PIA s'affiche simplement) mais lorsque nous démarrons en mode "production" nous avons un message d'erreur "Missing secret_key_base for 'production' environment, set this value in config/secrets.yml".

Je précise que nous avons bien généré la clé avec le rake secret, copié cette dernière dans le fichier application.yml mais malgré tout rien n'y fait. (normalement si je ne me trompe pas le fichier secrets.yml récupère pour l'environnement de production la valeur contenu dans le fichier application.yml)

Merci d'avance pour votre aide.

Cordialement.

Import doesn't work

I want to import a file created in the pia-app by my frien and I have got the attached error.

PIA_erro

Switch to production DB failing

Hi, i am not able to switch to production DB. The test and Development DB's are ok and working.

When using this command: RAILS_ENV=production bin/rake db:create

i get this error:

ArgumentError: Missing secret_key_base for 'production' environment, set this string with rails credentials:edit
/usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/application.rb:588:in validate_secret_key_base' /usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/application.rb:423:in secret_key_base'
/usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/application.rb:177:in key_generator' /usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/application.rb:201:in message_verifier'
/usr/local/rvm/gems/ruby-2.6.6/gems/activestorage-6.0.3.4/lib/active_storage/engine.rb:97:in block (2 levels) in <class:Engine>' /usr/local/rvm/gems/ruby-2.6.6/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:68:in block in execute_hook'
/usr/local/rvm/gems/ruby-2.6.6/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:61:in with_execution_control' /usr/local/rvm/gems/ruby-2.6.6/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:66:in execute_hook'
/usr/local/rvm/gems/ruby-2.6.6/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:52:in block in run_load_hooks' /usr/local/rvm/gems/ruby-2.6.6/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:51:in each'
/usr/local/rvm/gems/ruby-2.6.6/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:51:in run_load_hooks' /usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/application/finisher.rb:129:in block in module:Finisher'
/usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/initializable.rb:32:in instance_exec' /usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/initializable.rb:32:in run'
/usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/initializable.rb:61:in block in run_initializers' /usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/initializable.rb:60:in run_initializers'
/usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/application.rb:363:in initialize!' /opt/pia-back/config/environment.rb:5:in

'
/usr/local/rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in require' /usr/local/rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi'
/usr/local/rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' /usr/local/rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi'
/usr/local/rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in require' /usr/local/rvm/gems/ruby-2.6.6/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in block in require'
/usr/local/rvm/gems/ruby-2.6.6/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in load_dependency' /usr/local/rvm/gems/ruby-2.6.6/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in require'
/usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/application.rb:339:in require_environment!' /usr/local/rvm/gems/ruby-2.6.6/gems/railties-6.0.3.4/lib/rails/application.rb:523:in block in run_tasks_blocks'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)

Please proovide me some help.

Best regards.

Comment Installer sur Debian 9 ?

Bonjour,

Un problème simple ce pose comment installer ruby 2.3 et rails 5 en meme temps ?
Mon soucis et que je n'arrive pas à faire un gem install rails.
Il me dit qu'il ne peut pas compiler la source nativement.

Cordialement

impossible to delete a color declination

I use PrestaShop 1.7.4.3. I would like to remove a color attribute. When I do the manipulation, the color is removed, but when I import CSV, it reappears. I tried to rename it, change the place, empty the caches. Each time, it disappears well and after the import of CSV it reappears. How to make it disappear permanently? Thank you for your help

Production mode does not provide GET / routes

I don't know whenever this is a feature or a bug but running pia-back in production mode does not show the default page when opened in the browser.
A 404 error is returned and in the production log the following error is returned:
I, [2018-03-20T10:55:23.718037 #11260] INFO -- : [19d791e3-155e-4ad1-bfee-8d2dfa94ef59] Started GET "/" for xxx.xxx.xxx.xxx at 2018-03-20 10:55:23 +0100
F, [2018-03-20T10:55:23.719806 #11260] FATAL -- : [19d791e3-155e-4ad1-bfee-8d2dfa94ef59]
F, [2018-03-20T10:55:23.719921 #11260] FATAL -- : [19d791e3-155e-4ad1-bfee-8d2dfa94ef59] ActionController::RoutingError (No route matches [GET] "/"):
F, [2018-03-20T10:55:23.720018 #11260] FATAL -- : [19d791e3-155e-4ad1-bfee-8d2dfa94ef59]
F, [2018-03-20T10:55:23.720132 #11260] FATAL -- : [19d791e3-155e-4ad1-bfee-8d2dfa94ef59] actionpack (5.0.6) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'

Possibility to use SQL Server?

Hello,

our company fully uses Azure for all services. Might it be possible to install PIA tool on a SQL (Azure) Server database backend.
Postgres is not a total showstopper, yet limiting...

Some info: in order to ensure DB compatibility, scripts should be dialect-neutral, use as least unique features as possible, it is preferred to use an ORM (from the C# world, that's Entity Framework, I don't know about rails). Of course DB creation/migration scripts (DDLs) should be provided twice in the application package.

Thanks

Docker setup for the PIA-Tool

Based on KillianKemps awesome Docker scripts I've created a separate repository pia-docker to generate a complete Docker setup of the PIA application stack on a local machine.

This setup should be used to evaluate and demonstrate the PIA tool.

I'd would be nice, if LaboCNIL will take the official ownership of the repository as KillianKemps suggested in #15. Killian and me can continue to maintain it, if you like.

The simplicity of the Docker installation would accelerate the spread of the PIA tool in the wild.

For productive use in a multiuser environment there are still some things missing:

  1. First of all - PIA comes without a frontdoor - vulgo authencation. (I'm already working on that and I'll create a version of the PIA tool including authentication based on devise and omniauth in the backend and Angular token in the frontend. That will be done in three steps 1. create an authentication prototype (that's already done) - 2. add omniauth-ldap for the most common authentication used in business environments - 3. merge that into the PIA application stack)

  2. There is no SSL/TLS encryption of the servers and the communication between them (but perimeter security is useless without an existing frontdoor and is not needed for access via localhost on a local machine).

ruby version

Gem::InstallError: spring requires Ruby version >= 2.4.0.
An error occurred while installing spring (2.1.0), and Bundler cannot continue.
Make sure that gem install spring -v '2.1.0' --source 'https://rubygems.org/' succeeds before bundling.

Requirements and runbook talk abount Ruby v2.3.1, which is the correct one?

PIA Back V1.6 import bug

Bonjour,

J'ai installer from scratch la version 1.6 front et back (Ps j'en ai profité pour adapter les images à ma société ;) ).
La version 1.6 front fonctionne correctement avec la version 1.1 du back mais avec la version 1.6 voici les erreurs que j'obtiens :

A l'import d'un PIA exporter depuis la version front 1.5.0, la creation d'un nouveau PIA ne fonctionne pas également.

image

Après avoir cliquer sur le bouton "Edit"

image

Installing on CentOS 7

Hello,
I want to install this web application on a CentOS 7 server, also I want to connect it to an external PostgreSQL 9.5.3 server, the external server it's in the same network as the PIA server, will this application work fine with that PostgreSQL 9.5.3 server?

Thank you all.

Struggling to make the app run on Google App Engine

Hello,
Thank you for the good work on this project !
We ran the app locally, connecting it to a db on GCP via proxy using something like :

development:
  adapter:  postgresql
  host: 127.0.0.1
  encoding: unicode
  database: pia-db
  pool:     5
  timeout: 5000
  username: postgres
  password: test

Now we deployed to app engine with a config like :

production:
  adapter:  postgresql
  host: /cloudsql/[INSTANCE_NAME]
  database: pia-db
  timeout: 5000
  pool:     5
  username: postgres
  password: test

But the moment we try to connect our front with the back via Settings using the deployed backend service url, it says connection is impossible. The logs on app engine don't say much, juste server error 500 on / GET /pias, with this only error :

image

We're new to rails, and we would appreciate any help

Thank you

probleme installation

Bonjour,
Je voudrai installer la version web du PIA mais je bloque .
J'ai installé ruby rails et postgresql + modifié les fichiers ensuite j'ai fait l'install du bundle sans erreur

Mais quand je lance le db:create (nothing!! ) donc je cherche de l'aide en plus je suis novice sur ubuntu donc désolé;)
--- voila mon probleme il ne crée rien dans postgresql----*********************
root@dufour-Virtual-Machine:/home/dufour/pia-back# bin/rake db:create
/home/dufour/pia-back/config/environments/development.rb:46:in block in <top (required)>': uninitialized constant ActiveSupport::EventedFileUpdateChecker (NameError) from /usr/lib/ruby/vendor_ruby/rails/railtie.rb:210:in instance_eval'
from /usr/lib/ruby/vendor_ruby/rails/railtie.rb:210:in configure' from /home/dufour/pia-back/config/environments/development.rb:1:in <top (required)>'
from /usr/lib/ruby/vendor_ruby/rails/engine.rb:598:in block (2 levels) in <class:Engine>' from /usr/lib/ruby/vendor_ruby/rails/engine.rb:597:in each'
from /usr/lib/ruby/vendor_ruby/rails/engine.rb:597:in block in <class:Engine>' from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in instance_exec'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in run' from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:55:in block in run_initializers'
from /usr/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each' from /usr/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component'
from /usr/lib/ruby/2.3.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' from /usr/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from'
from /usr/lib/ruby/2.3.0/tsort.rb:421:in block in each_strongly_connected_component_from' from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in each'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in tsort_each_child' from /usr/lib/ruby/2.3.0/tsort.rb:415:in call'
from /usr/lib/ruby/2.3.0/tsort.rb:415:in each_strongly_connected_component_from' from /usr/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component'
from /usr/lib/ruby/2.3.0/tsort.rb:347:in each' from /usr/lib/ruby/2.3.0/tsort.rb:347:in call'
from /usr/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component' from /usr/lib/ruby/2.3.0/tsort.rb:226:in tsort_each'
from /usr/lib/ruby/2.3.0/tsort.rb:205:in tsort_each' from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in run_initializers'
from /usr/lib/ruby/vendor_ruby/rails/application.rb:352:in initialize!' from /home/dufour/pia-back/config/environment.rb:5:in <top (required)>'
from /usr/lib/ruby/vendor_ruby/spring/application.rb:92:in require' from /usr/lib/ruby/vendor_ruby/spring/application.rb:92:in preload'
from /usr/lib/ruby/vendor_ruby/spring/application.rb:143:in serve' from /usr/lib/ruby/vendor_ruby/spring/application.rb:131:in block in run'
from /usr/lib/ruby/vendor_ruby/spring/application.rb:125:in loop' from /usr/lib/ruby/vendor_ruby/spring/application.rb:125:in run'
from /usr/lib/ruby/vendor_ruby/spring/application/boot.rb:18:in <top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from -e:1:in

'
root@dufour-Virtual-Machine:/home/dufour/pia-back#
-------------------------------------------------*************************************

Merci pour votre aide

Sincerement a+

Need help during installation

Good day everyone,

I went through the installtion of the PIA-Back application on a Server and after much learnings of "How to correct the deprecated point in the tutorial (https://github.com/LINCnil/pia-back readme.md and the very old runbook) I got a running pia-backend. Running in meaning of "Bin/rails s -b 10.34.10.253 -p 8080"-leads to a running website. Now I am struggling with PIA-Fronend and the pia-application. I´ve downloaded the repository, installed the NPM sudo npm install npm@latest -g and sudo npm install -g @angular/cli Also done sudo ng serve 10.0.xx.xx -port 4200.

But I always get the message of "The serve command requires to be run in an Angular project, but a project definition could not be found." or "Project '–host' does not exist."

I don´t have any clue anymore. Where to find the angular project?

Faithfully
Philipp

pb post install ...

Bonjour,

je viens d'arriver au bout de l'installation.
(D'ailleurs, si ça intéresse quelqu'un, j'ai rédigé un mode opératoire complet d'installation sous débian)
J'obtiens bien une page web avec le logo "pia".
Mais c'est tout ... aucun menu, aucun bouton ... juste une page statique avec le logo.

Et lorsque je lance bin/rake pour tester .. voilà ce que je reçois :

Running via Spring preloader in process 13668 Run options: --seed 14270 Running: ...E Error: AttachmentsControllerTest#test_should_update_attachment: AbstractController::ActionNotFound: The action 'update' could not be found for AttachmentsController test/controllers/attachments_controller_test.rb:28:in block in <class:AttachmentsControllerTest> bin/rails test test/controllers/attachments_controller_test.rb:27 .......................... Finished in 3.452382s, 8.6897 runs/s, 11.5862 assertions/s. 30 runs, 40 assertions, 0 failures, 1 errors, 0 skips

Je ne trouve rien sur le sujet qui pourrait m'aider.
Auriez-vous une idée ?

Pb de connexion Client 2.0.0

Bonjour,
j'ai passé mon client Windows 1.6.3
en version 2.0.0

La mise a jour de l'URL ne fonctionne plus,
la connexion ne se fait pas
côté Client j'ai le message Connexion Impossible
Côté Serveur Pia-Back j'ai les erreurs suivantes dans le fichier production.log

I, [2018-12-12T11:18:47.651518 #1234] INFO -- : [87576b08-8043-4deb-95fe-0841c66c2182] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.3ms)
I, [2018-12-12T11:19:05.362932 #1234] INFO -- : [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] Started GET "/" for 10.1.8.206 at 2018-12-12 11:19:05 +0100
F, [2018-12-12T11:19:05.363928 #1234] FATAL -- : [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5]
F, [2018-12-12T11:19:05.364003 #1234] FATAL -- : [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] ActionController::RoutingError (No route matches [GET] "/"):
F, [2018-12-12T11:19:05.364028 #1234] FATAL -- : [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5]
F, [2018-12-12T11:19:05.364052 #1234] FATAL -- : [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] actionpack (5.0.6) lib/action_dispatch/middleware/debug_exceptions.rb:53:in call' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] actionpack (5.0.6) lib/action_dispatch/middleware/show_exceptions.rb:31:in call'
[dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] railties (5.0.6) lib/rails/rack/logger.rb:36:in call_app' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] railties (5.0.6) lib/rails/rack/logger.rb:24:in block in call'
[dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] activesupport (5.0.6) lib/active_support/tagged_logging.rb:69:in block in tagged' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] activesupport (5.0.6) lib/active_support/tagged_logging.rb:26:in tagged'
[dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] activesupport (5.0.6) lib/active_support/tagged_logging.rb:69:in tagged' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] railties (5.0.6) lib/rails/rack/logger.rb:24:in call'
[dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] actionpack (5.0.6) lib/action_dispatch/middleware/request_id.rb:24:in call' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] rack (2.0.3) lib/rack/runtime.rb:22:in call'
[dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] activesupport (5.0.6) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] actionpack (5.0.6) lib/action_dispatch/middleware/executor.rb:12:in call'
[dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] rack (2.0.3) lib/rack/sendfile.rb:111:in call' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] rack-cors (1.0.1) lib/rack/cors.rb:93:in call'
[dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] railties (5.0.6) lib/rails/engine.rb:522:in call' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] puma (3.10.0) lib/puma/configuration.rb:225:in call'
[dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] puma (3.10.0) lib/puma/server.rb:605:in handle_request' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] puma (3.10.0) lib/puma/server.rb:437:in process_client'
[dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] puma (3.10.0) lib/puma/server.rb:301:in block in run' [dffa1bb7-b93d-470e-b4f3-78fbdf7e5da5] puma (3.10.0) lib/puma/thread_pool.rb:120:in block in spawn_thread'

Si je repasse en version 1.6.3 la connexion refonctionne.

Cdt,
Ch. Le Chenadec

Error 404 : env_production

En environnement de production (en developpement cela fonctionne bien), l'appel GET à l'index du serveur renvoit une erreur 404 avec le log suivant côté serveur :

I, [2017-12-01T15:38:24.180155 #29] INFO -- : [2d77470e-4d26-44e9-9224-5583dc021282] Started GET "/" for 10.XX.XX.XX at 2017-12-01 15:38:24 +0000
F, [2017-12-01T15:38:24.180624 #29] FATAL -- : [2d77470e-4d26-44e9-9224-5583dc021282]
F, [2017-12-01T15:38:24.180664 #29] FATAL -- : [2d77470e-4d26-44e9-9224-5583dc021282] ActionController::RoutingError (No route matches [GET] "/"):
F, [2017-12-01T15:38:24.180685 #29] FATAL -- : [2d77470e-4d26-44e9-9224-5583dc021282]
F, [2017-12-01T15:38:24.180709 #29] FATAL -- : [2d77470e-4d26-44e9-9224-5583dc021282] actionpack (5.0.6) lib/action_dispatch/middleware/debug_exceptions.rb:53:in call' [2d77470e-4d26-44e9-9224-5583dc021282] actionpack (5.0.6) lib/action_dispatch/middleware/show_exceptions.rb:31:in call'
[2d77470e-4d26-44e9-9224-5583dc021282] railties (5.0.6) lib/rails/rack/logger.rb:36:in call_app' [2d77470e-4d26-44e9-9224-5583dc021282] railties (5.0.6) lib/rails/rack/logger.rb:24:in block in call'
[2d77470e-4d26-44e9-9224-5583dc021282] activesupport (5.0.6) lib/active_support/tagged_logging.rb:69:in block in tagged' [2d77470e-4d26-44e9-9224-5583dc021282] activesupport (5.0.6) lib/active_support/tagged_logging.rb:26:in tagged'
[2d77470e-4d26-44e9-9224-5583dc021282] activesupport (5.0.6) lib/active_support/tagged_logging.rb:69:in tagged' [2d77470e-4d26-44e9-9224-5583dc021282] railties (5.0.6) lib/rails/rack/logger.rb:24:in call'
[2d77470e-4d26-44e9-9224-5583dc021282] actionpack (5.0.6) lib/action_dispatch/middleware/request_id.rb:24:in call' [2d77470e-4d26-44e9-9224-5583dc021282] rack (2.0.3) lib/rack/runtime.rb:22:in call'
[2d77470e-4d26-44e9-9224-5583dc021282] activesupport (5.0.6) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call' [2d77470e-4d26-44e9-9224-5583dc021282] actionpack (5.0.6) lib/action_dispatch/middleware/executor.rb:12:in call'
[2d77470e-4d26-44e9-9224-5583dc021282] rack (2.0.3) lib/rack/sendfile.rb:111:in call' [2d77470e-4d26-44e9-9224-5583dc021282] rack-cors (1.0.1) lib/rack/cors.rb:93:in call'
[2d77470e-4d26-44e9-9224-5583dc021282] railties (5.0.6) lib/rails/engine.rb:522:in call' [2d77470e-4d26-44e9-9224-5583dc021282] puma (3.10.0) lib/puma/configuration.rb:225:in call'
[2d77470e-4d26-44e9-9224-5583dc021282] puma (3.10.0) lib/puma/server.rb:605:in handle_request' [2d77470e-4d26-44e9-9224-5583dc021282] puma (3.10.0) lib/puma/server.rb:437:in process_client'
[2d77470e-4d26-44e9-9224-5583dc021282] puma (3.10.0) lib/puma/server.rb:301:in block in run' [2d77470e-4d26-44e9-9224-5583dc021282] puma (3.10.0) lib/puma/thread_pool.rb:120:in block in spawn_thread'

Travail collaboratif

Bonjour,

Nous avons mis en place PIA-back sur notre environnement.
Grâce à la documentation d'installation, nous avons réalisés l'installation sans trop de difficultés. Actuellement, les fiches PIA sont stockées sur le navigateur et il n'est donc pas possible de visionner ou de modifier ces fiches par un autre utilisateur / autre ordinateur sans passer par un export.
Serait-ce une erreur lors de l'installation ou est-ce une fonctionnalité qui n'est pour l'instant pas disponible ?

Merci d'avance pour vos retours

Access not possible

When i rails serve in production, i can't access the url, but the serve is rails and it's say that i can access it in the url

Pia application Menu Tools Absent

Bonjour,
nous exécutons le serveur via la commande
bin/rails s -b 10.1.8.237 -p 80

=> Booting Puma
=> Rails 5.0.6 application starting in development on http://10.1.8.237:80
=> Run rails server -h for more startup options
Puma starting in single mode...

  • Version 3.10.0 (ruby 2.3.1-p112), codename: Russell's Teapot
  • Min threads: 5, max threads: 5
  • Environment: development
  • Listening on tcp://10.1.8.237:80
    Use Ctrl-C to stop

Lorsque, depuis un PC on se connecte sur cette URL, nous avons seulement
l'image de fond PIA mais pas de menu Tools.

Ch. Le Chenadec

Problème à la création des tables

Bonjour,

J'essaie d'installer PIA sur mon serveur debian mais je parviens pas à créer la base de données quand j'effectue la commande rake db:migrate

Voici ce qui sort :
== 20170731082629 CreatePias: migrating =======================================
-- create_table(:pias)
-> 0.0210s
== 20170731082629 CreatePias: migrated (0.0214s) ==============================

== 20170731083917 CreateAnswers: migrating ====================================
-- create_table(:answers)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedObject: ERREUR: le type « jsonb » n'existe pas
LINE 1: SELECT 'jsonb'::regtype::oid
^
: SELECT 'jsonb'::regtype::oid/var/lib/gems/2.3.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `async_exec'

Il y a d'autres lignes mais je suis pas sur de la pertinence, si besoin j'ai copié les lignes.
J'ai eu pas mal de soucis d'installation avec des dépots pas à jour, etc mais là je sèche j'arrive pas à avancer.
Une idée du souci ?

Merci :)

probleme connection on postgres when i run "bin/rake db:create"

Thank you for helpping on my last issue, i've a new probs when i "db:create":

Running via Spring preloader in process 22915
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:create
FATAL:  password authentication failed for user "administrateur"
FATAL:  password authentication failed for user "administrateur"
Couldn't create database for {"adapter"=>"postgresql", "host"=>"localhost", "encoding"=>"unicode", "database"=>"pia_production", "pool"=>5, "username"=>"administrateur", "password"=>"Fiat50012345", "template"=>"template0"}
rake aborted!
PG::ConnectionBad: FATAL:  password authentication failed for user "administrateur"
FATAL:  password authentication failed for user "administrateur"
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/pg-1.0.0/lib/pg.rb:56:in `initialize'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/pg-1.0.0/lib/pg.rb:56:in `new'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/pg-1.0.0/lib/pg.rb:56:in `connect'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:673:in `connect'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in `initialize'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:729:in `new_connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:773:in `checkout_new_connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:752:in `try_to_checkout_new_connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:713:in `acquire_connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:490:in `checkout'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:364:in `connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:883:in `retrieve_connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_handling.rb:128:in `retrieve_connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/connection_handling.rb:91:in `connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/tasks/postgresql_database_tasks.rb:6:in `connection'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/tasks/postgresql_database_tasks.rb:15:in `create'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:109:in `create'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:129:in `block in create_current'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:295:in `block in each_current_configuration'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each_current_configuration'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:128:in `create_current'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/activerecord-5.0.7.2/lib/active_record/railties/databases.rake:27:in `block (2 levels) in <top (required)>'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
/home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
/home/administrateur/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
/mnt/c/Users/administrateur/pia-back/bin/rake:9:in `<top (required)>'
/home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
-e:1:in `<main>'
Tasks: TOP => db:create

Projet Pia

Bonjour,
Je viens de finaliser l'installation de Pia en back et en front.

Comment peut on rendre visible tout les projets créés? à l'ensemble des utlisateurs?
merci

user management, integration with AD

Hi. thanks for great app. I have questions:

  1. It is planned any kind of user management, ability to grant privileges to view/add-edit/accepting PIAs ?
  2. It is planned possibility to AD/LDAP integration?

Thanks for your effort.

Prochaine version

Bonjour,
A quelle fréquence sont prévues les nouvelles versions de l'outil ?

Quelle est la date de la prochaine ?

Merci

Problems when i rails server, and for db:create db:migrate

Hi,

Please can you help me it's urgent, I have a problem, even after doing all the steps, when I run the command "RAILS_ENV=production bin/rake db:create" or migrate, i get this:

/mnt/c/Users/administrateur/pia-back/config/initializers/cors.rb:10:in `block (2 levels) in <top (required)>': undefined method `split' for nil:NilClass (NoMethodError)
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-cors-1.0.2/lib/rack/cors.rb:62:in `instance_eval'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-cors-1.0.2/lib/rack/cors.rb:62:in `allow'
        from /mnt/c/Users/administrateur/pia-back/config/initializers/cors.rb:9:in `block in <top (required)>'
/mnt/c/Users/administrateur/pia-back$      from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-cors-1.0.2/lib/rack/cors.rb:47:in `instance_eval'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-cors-1.0.2/lib/rack/cors.rb:47:in `initialize'
     from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:35:in `new'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:35:in `build'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:100:in `block in build'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:100:in `each'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:100:in `inject'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:100:in `build'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/engine.rb:508:in `block in app'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/engine.rb:504:in `synchronize'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/engine.rb:504:in `app'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/application/finisher.rb:37:in `block in <module:Finisher>'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `instance_exec'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `run'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:347:in `each'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:347:in `call'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/initializable.rb:54:in `run_initializers'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/application.rb:352:in `initialize!'
        from /mnt/c/Users/administrateur/pia-back/config/environment.rb:5:in `<top (required)>'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/application.rb:102:in `require'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/application.rb:102:in `preload'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
        from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from -e:1:in `<main>'

also, when i run the command "rails s", I get this:

DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from <top (required)> at /mnt/c/Users/administrateur/pia-back/config/application.rb:17)
=> Booting Puma
=> Rails 5.0.7.2 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Exiting
Traceback (most recent call last):
        63: from bin/rails:3:in `<main>'
        62: from bin/rails:3:in `load'
        61: from /mnt/c/Users/administrateur/pia-back/bin/spring:15:in `<top (required)>'
        60: from /mnt/c/Users/administrateur/pia-back/bin/spring:15:in `require'
        59: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
        58: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
        57: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
        56: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
        55: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
        54: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
        53: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
        52: from /mnt/c/Users/administrateur/pia-back/bin/rails:9:in `<top (required)>'
        51: from /mnt/c/Users/administrateur/pia-back/bin/rails:9:in `require'
        50: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/commands.rb:18:in `<top (required)>'
        49: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
        48: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:85:in `server'
        47: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:85:in `tap'
        46: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:90:in `block in server'
        45: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/commands/server.rb:102:in `start'
        44: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/commands/server.rb:148:in `log_to_stdout'
        43: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-2.0.6/lib/rack/server.rb:354:in `wrapped_app'
        42: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/commands/server.rb:84:in `app'
        41: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-2.0.6/lib/rack/server.rb:219:in `app'
        40: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-2.0.6/lib/rack/server.rb:319:in `build_app_and_options_from_config'
        39: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-2.0.6/lib/rack/builder.rb:40:in `parse_file'
        38: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-2.0.6/lib/rack/builder.rb:49:in `new_from_string'
        37: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-2.0.6/lib/rack/builder.rb:49:in `eval'
        36: from /mnt/c/Users/administrateur/pia-back/config.ru:in `<main>'
        35: from /mnt/c/Users/administrateur/pia-back/config.ru:in `new'
        34: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
        33: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-2.0.6/lib/rack/builder.rb:55:in `instance_eval'
        32: from /mnt/c/Users/administrateur/pia-back/config.ru:3:in `block in <main>'
        31: from /mnt/c/Users/administrateur/pia-back/config.ru:3:in `require_relative'
        30: from /mnt/c/Users/administrateur/pia-back/config/environment.rb:5:in `<top (required)>'
        29: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/application.rb:352:in `initialize!'
        28: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/initializable.rb:54:in `run_initializers'
        27: from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
        26: from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
        25: from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
        24: from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:347:in `call'
        23: from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:347:in `each'
        22: from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
        21: from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
        20: from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        19: from /home/administrateur/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
        18: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/initializable.rb:55:in `block in run_initializers'
        17: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `run'
        16: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `instance_exec'
        15: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/application/finisher.rb:37:in `block in <module:Finisher>'
        14: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/engine.rb:504:in `app'
        13: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/engine.rb:504:in `synchronize'
        12: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/railties-5.0.7.2/lib/rails/engine.rb:508:in `block in app'
        11: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:100:in `build'
        10: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:100:in `inject'
         9: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:100:in `each'
         8: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:100:in `block in build'
         7: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:35:in `build'
         6: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/stack.rb:35:in `new'
         5: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-cors-1.0.2/lib/rack/cors.rb:47:in `initialize'
         4: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-cors-1.0.2/lib/rack/cors.rb:47:in `instance_eval'
         3: from /mnt/c/Users/administrateur/pia-back/config/initializers/cors.rb:9:in `block in <top (required)>'
         2: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-cors-1.0.2/lib/rack/cors.rb:62:in `allow'
         1: from /home/administrateur/.rvm/gems/ruby-2.5.5/gems/rack-cors-1.0.2/lib/rack/cors.rb:62:in `instance_eval'
/mnt/c/Users/administrateur/pia-back/config/initializers/cors.rb:10:in `block (2 levels) in <top (required)>': undefined method `split' for nil:NilClass (NoMethodError)

Thank you for helpping

Cartographie vide en mode pia-back

Bonjour

Après installation du serveur pia-back, en utilisant l'application v 1.6.0, la vue "Cartographie des risques" reste vide.
Ce problème n'existe pas avec l'application mode standalone.

Cela vient-il d'un problème de paramétrage du serveur.

En vous remerciant
S. Nardy

database.yml - unable to set the port

Considering the template:
development:
adapter: postgresql
host: myhostname:5632
encoding: unicode
database: pia
pool: 5
username: piaadmin
password: mypassword
template: template0

is correct to set the port of the cluster in that manner?

Thank you

Integration of data processing contracts

As far as I see, PIA covers the data protection impact assessment. Is it planned to extend it to manage data processing contracts and/or records of processing activities (Article 30 GDPR)?

Roadmap PIA, possibilité de contribuer ?

Bonjour les project leaders,

Libre Informatique (coopérative éditrice de logiciels libres) déploie actuellement une solution professionnelle ("PiaLab autour d'outils et de conseils pour accompagner les mises en conformité au RGPD des organisations. Pour ce faire, nous sommes partis d'une base logicielle s'appuyant sur des briques existantes dont celles de PIA développé ici même.

Nous pensons faire fortement progresser PIA mais se pose donc la question de la roadmap et du lead. Nous hésitons entre forker ou contribuer directement. Dans le cas où nous choisirions cette dernière option, Libre Informatique aura besoin de fonctionner avec des processus efficaces où elle devra pouvoir participer aux décisions. En effet, nous ne pouvons professionnellement pas renoncer à participer aux décisions quand cela a un impact fort sur nos obligations et nos engagements pros vis-à-vis de tiers.

Au niveau roadmap, nous avons besoin de rajouter un certain nombre de fonctionnalités, par exemple:

  • Authentification/identification des acteurs + gestion de rôles et permissions
  • Ajout d'un accès à une banque de modèles de registres (privative?)
  • Possibilité de limiter la PIA à tout ou partie des étapes exhaustives en fonction de choix arbitraires ou guidés (via la définition de la sensibilité des données par exemple)
  • Possibilité de déterminer des risques et des mesures à appliquer à plusieurs PIA
  • Gestion de crises
  • Fonctionnalités permettant le travail collaboratif (workflow, tableau de bord personnalisé)
  • Identification des acteurs + sous-traitants + etc.
  • Regroupement des PIAs par traitement de référence (traçabilité)
  • Extraction de bilans généraux (aggrégation de chaque PIA, et de l'historique des évolutions)
  • Gestion réelle de calendriers
  • etc.

Est-ce que cela peut s'inscrire dans votre Roadmap ? Préférez-vous que nous contribuions directement sur des forks ou sur les repositories officiels ?

En vous remerciant de votre attention,
Bien librement,

Running as a service / SystemD service file

I wanted to run pia-back the right way via SystemD and came up with this little service file. I wanted to share it here for others to find or maybe for you to implement it into the project.

It is tailorded to my personal environment (ruby installed via rvm and a pia user+group for running the app)

/etc/systemd/system/pia-back.service

[Unit]
Description=Pia Backend
Requires=network.target
Requires=postgresql.service

[Service]
Type=simple
User=pia
Group=pia
WorkingDirectory=/opt/pia/pia-back
Environment=RAILS_ENV=production
ExecStart=/bin/bash -c "source /etc/profile.d/rvm.sh; /opt/pia/pia-back/bin/rails s -b 0.0.0.0 -p 3000"
TimeoutSec=30
RestartSec=15s
Restart=always

[Install]
WantedBy=multi-user.target

This works for me, but be sure to adjust it to your particular environment. I give no guarantee for correctness or that this is the best way!

pia/pia-back linking issue

Hi,

I am having trouble linking the pia app to the pia backend.
I can run both individually, but when I enter the address "http://localhost:3000" in the settings of the app, I get the "connection impossible" error.

The console gives me the following message :
Blocage d’une requête multiorigines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur http://localhost:3000/. Raison : l’identification n’est pas prise en charge si la valeur de l’en-tête CORS « Access-Control-Allow-Origin » est « * ».

So I checked in the front-end sources :
fetch(this.settingsForm.value.server_url, {
mode: 'cors',
credentials : 'include'
}

The value include should be what we want indeed but if I understood well the error message in the console, the browser considers this parameter to be "same-origin".

I also checked the backend source:

Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins ENV['ALLOWED_CORS_ORIGINS'].split(',')
resource '*', headers: :any, methods: %i[get post put patch delete options head]
end
end

and

ALLOWED_CORS_ORIGINS: '*'

so it should be OK.

Has anyone solved this issue ?

Thanks in advance.

Fabien.

Duplicate entry in "Fundamental principles" view ("Action plan" view)

First of all, thank you for making this tool available to the community.

I want to report a duplicate entry in "Fundamental principles" view:

  • "Information des personnes" appears twice (second one should be " Droit d'accès et droit à la portabilité" instead)
  • True in FR and EN version (no further language test)
  • Action to reproduce: appears irrespective of - desktop or server - version including plain vanilla install without any user input (i.e. this is visible on example project)
  • Version tested : V2.0.0 both desktop (Win and Mac OS) and server version (using Yunohost install https://github.com/YunoHost-Apps/pia_ynh on Debain Stretch )
  • Browser : FF 65.0.5 (64b) for server version (client connection side)
  • OS : Win 10 64b

Information des personnes

bin/rake db:create

Bonjour,
lors du lancement de la commande
bin/rake db:create
nous avons l'erreur suivante :

/var/lib/gems/2.3.0/gems/figaro-1.1.1/lib/figaro/application.rb:64:in global_configuration': undefined method reject' for #String:0x00000003419238 (NoMethodError)
from /var/lib/gems/2.3.0/gems/figaro-1.1.1/lib/figaro/application.rb:32:in configuration' from /var/lib/gems/2.3.0/gems/figaro-1.1.1/lib/figaro/application.rb:42:in each'
from /var/lib/gems/2.3.0/gems/figaro-1.1.1/lib/figaro/application.rb:36:in load' from /var/lib/gems/2.3.0/gems/figaro-1.1.1/lib/figaro.rb:23:in load'
from /var/lib/gems/2.3.0/gems/figaro-1.1.1/lib/figaro/rails/railtie.rb:5:in block in <class:Railtie>' from /var/lib/gems/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:67:in block in execute_hook'
from /var/lib/gems/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:60:in with_execution_control' from /var/lib/gems/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:65:in execute_hook'
from /var/lib/gems/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:50:in block in run_load_hooks' from /var/lib/gems/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:49:in each'
from /var/lib/gems/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:49:in run_load_hooks' from /var/lib/gems/2.3.0/gems/railties-5.0.6/lib/rails/application.rb:90:in inherited'
from /opt/pia-back/config/application.rb:20:in <module:PiaBack>' from /opt/pia-back/config/application.rb:19:in <top (required)>'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:in require' from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:in preload'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:153:in serve' from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:141:in block in run'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:in loop' from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:in run'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in <top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from -e:1:in

'

Détail de l’Environnement
-- Ubuntu 16.04.3 LTS
-- ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
-- Rails 5.0.6
-- postgresql 9.5
-- Pia-Back
commit 1b5d256
Author: Bruno Perles [email protected]
Date: Fri Dec 1 17:48:32 2017 +0100

Cdt,
Ch. Le Chenadec

JSON::ParserError (784: unexpected token at '""') after update to version 2.0.0

Hello,

After updating front and back applications from version 1.6.4 to 2.0.0, the creation of a new entry fails.
The POST request to /pias results in a 500 Internal Server Error.

I, [2018-12-13T09:55:59.367832 #24252]  INFO -- : [9c27197b-0a35-4471-a696-972937dd5f66] Started POST "/pias" for 127.0.0.1 at 2018-12-13 09:55:59 +0100
I, [2018-12-13T09:55:59.370565 #24252]  INFO -- : [9c27197b-0a35-4471-a696-972937dd5f66] Processing by PiasController#create as */*
I, [2018-12-13T09:55:59.370671 #24252]  INFO -- : [9c27197b-0a35-4471-a696-972937dd5f66]   Parameters: {"pia"=>{"name"=>"test", "author_name"=>"test", "evaluator_name"=>"test", "validator_name"=>"test", "dpo_status"=>"undefined", "dpo_opinion"=>"undefined", "concerned_people_opinion"=>"undefined", "concerned_people_status"=>"undefined", "rejected_reason"=>"undefined", "applied_adjustements"=>"undefined", "created_at"=>"Thu Dec 13 2018 09:56:00 GMT+0100 (Central European Standard Time)", "updated_at"=>"undefined", "status"=>"0", "is_example"=>"0", "dpos_names"=>"undefined", "people_names"=>"undefined", "concerned_people_searched_opinion"=>"undefined", "concerned_people_searched_content"=>"undefined", "structure_id"=>"", "structure_name"=>"undefined", "structure_sector_name"=>"undefined", "structure_data"=>"\"\""}}
I, [2018-12-13T09:55:59.372085 #24252]  INFO -- : [9c27197b-0a35-4471-a696-972937dd5f66] Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
F, [2018-12-13T09:55:59.372774 #24252] FATAL -- : [9c27197b-0a35-4471-a696-972937dd5f66]
F, [2018-12-13T09:55:59.372833 #24252] FATAL -- : [9c27197b-0a35-4471-a696-972937dd5f66] JSON::ParserError (784: unexpected token at '""'):
F, [2018-12-13T09:55:59.372869 #24252] FATAL -- : [9c27197b-0a35-4471-a696-972937dd5f66]
F, [2018-12-13T09:55:59.372905 #24252] FATAL -- : [9c27197b-0a35-4471-a696-972937dd5f66] app/controllers/pias_controller.rb:30:in `create'

Chrome shows the folloying request content being sent :

-----WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[name]"
 
test
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[author_name]"
 
test
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[evaluator_name]"
 
test
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[validator_name]"
 
test
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[dpo_status]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[dpo_opinion]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[concerned_people_opinion]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[concerned_people_status]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[rejected_reason]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[applied_adjustements]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[created_at]"
 
Thu Dec 13 2018 09:56:00 GMT+0100 (Central European Standard Time)
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[updated_at]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[status]"
 
0
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[is_example]"
 
0
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[dpos_names]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[people_names]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[concerned_people_searched_opinion]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[concerned_people_searched_content]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[structure_id]"
 
 
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[structure_name]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[structure_sector_name]"
 
undefined
------WebKitFormBoundaryF35LfFh31pBo4d0J
Content-Disposition: form-data; name="pia[structure_data]"
 
""
------WebKitFormBoundaryF35LfFh31pBo4d0J--

I suspect the "" value of pia[structure_data] is not being parsed correctly.
Could you please provide some help in investigating this issue?

Thanks and best regards !

db create / migrate fails

#29 Hi / Bonjour

When creating and migrating the database, i have errors about "answers" database not existing during migration process / Lors de la procédure de création et de migration initiale de la base de donnée, j'ai des erreurs à propos de la base "answers" non présente - existante

here is the full migrate command with --trace option as suggested by the failed migrate command :

# RAILS_ENV=production bin/rake db:migrate --trace
Running via Spring preloader in process 6639
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== 20170731083917 CreateAnswers: migrating ====================================
-- create_table(:answers)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedObject: ERROR:  type "jsonb" does not exist
LINE 1: SELECT 'jsonb'::regtype::oid
               ^
: SELECT 'jsonb'::regtype::oid
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `async_exec'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `block in execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.0.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:97:in `execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:384:in `lookup_cast_type'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/quoting.rb:110:in `quote_default_expression'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/quoting.rb:67:in `quote_default_expression'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:17:in `quote_default_expression'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:113:in `add_column_options!'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:18:in `add_column_options!'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:34:in `visit_ColumnDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:11:in `visit_ColumnDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:14:in `accept'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:45:in `block in visit_TableDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:45:in `map'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:45:in `visit_TableDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:14:in `accept'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:846:in `block in method_missing'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:815:in `block in say_with_time'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:815:in `say_with_time'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:835:in `method_missing'
/home/admin/pia-back/db/migrate/20170731083917_create_answers.rb:3:in `change'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:789:in `exec_migration'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:773:in `block (2 levels) in migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:772:in `block in migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:771:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:951:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1232:in `block in execute_migration_in_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1300:in `block in ddl_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/transactions.rb:211:in `transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1300:in `ddl_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1231:in `execute_migration_in_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1203:in `block in migrate_without_lock'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1202:in `each'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1202:in `migrate_without_lock'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1150:in `block in migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1319:in `with_advisory_lock'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1150:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1006:in `up'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:984:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/tasks/database_tasks.rb:163:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `block in execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `each'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:181:in `invoke'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:153:in `invoke_task'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `block (2 levels) in top_level'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `each'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `block in top_level'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:118:in `run_with_threads'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:103:in `top_level'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:81:in `block in run'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:179:in `standard_exception_handling'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:78:in `run'
/home/admin/pia-back/bin/rake:9:in `<top (required)>'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
-e:1:in `<main>'
ActiveRecord::StatementInvalid: PG::UndefinedObject: ERROR:  type "jsonb" does not exist
LINE 1: SELECT 'jsonb'::regtype::oid
               ^
: SELECT 'jsonb'::regtype::oid
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `async_exec'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `block in execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.0.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:97:in `execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:384:in `lookup_cast_type'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/quoting.rb:110:in `quote_default_expression'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/quoting.rb:67:in `quote_default_expression'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:17:in `quote_default_expression'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:113:in `add_column_options!'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:18:in `add_column_options!'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:34:in `visit_ColumnDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:11:in `visit_ColumnDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:14:in `accept'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:45:in `block in visit_TableDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:45:in `map'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:45:in `visit_TableDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:14:in `accept'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:846:in `block in method_missing'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:815:in `block in say_with_time'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:815:in `say_with_time'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:835:in `method_missing'
/home/admin/pia-back/db/migrate/20170731083917_create_answers.rb:3:in `change'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:789:in `exec_migration'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:773:in `block (2 levels) in migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:772:in `block in migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:771:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:951:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1232:in `block in execute_migration_in_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1300:in `block in ddl_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/transactions.rb:211:in `transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1300:in `ddl_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1231:in `execute_migration_in_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1203:in `block in migrate_without_lock'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1202:in `each'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1202:in `migrate_without_lock'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1150:in `block in migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1319:in `with_advisory_lock'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1150:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1006:in `up'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:984:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/tasks/database_tasks.rb:163:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `block in execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `each'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:181:in `invoke'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:153:in `invoke_task'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `block (2 levels) in top_level'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `each'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `block in top_level'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:118:in `run_with_threads'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:103:in `top_level'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:81:in `block in run'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:179:in `standard_exception_handling'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:78:in `run'
/home/admin/pia-back/bin/rake:9:in `<top (required)>'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
-e:1:in `<main>'
PG::UndefinedObject: ERROR:  type "jsonb" does not exist
LINE 1: SELECT 'jsonb'::regtype::oid
               ^
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `async_exec'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `block in execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.0.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:97:in `execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:384:in `lookup_cast_type'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/quoting.rb:110:in `quote_default_expression'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/quoting.rb:67:in `quote_default_expression'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:17:in `quote_default_expression'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:113:in `add_column_options!'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:18:in `add_column_options!'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:34:in `visit_ColumnDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:11:in `visit_ColumnDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:14:in `accept'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:45:in `block in visit_TableDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:45:in `map'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:45:in `visit_TableDefinition'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_creation.rb:14:in `accept'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:846:in `block in method_missing'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:815:in `block in say_with_time'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:815:in `say_with_time'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:835:in `method_missing'
/home/admin/pia-back/db/migrate/20170731083917_create_answers.rb:3:in `change'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:789:in `exec_migration'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:773:in `block (2 levels) in migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:772:in `block in migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:771:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:951:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1232:in `block in execute_migration_in_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1300:in `block in ddl_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/transactions.rb:211:in `transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1300:in `ddl_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1231:in `execute_migration_in_transaction'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1203:in `block in migrate_without_lock'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1202:in `each'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1202:in `migrate_without_lock'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1150:in `block in migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1319:in `with_advisory_lock'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1150:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:1006:in `up'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/migration.rb:984:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/tasks/database_tasks.rb:163:in `migrate'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.0.6/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `block in execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `each'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `execute'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/task.rb:181:in `invoke'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:153:in `invoke_task'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `block (2 levels) in top_level'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `each'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `block in top_level'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:118:in `run_with_threads'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:103:in `top_level'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:81:in `block in run'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:179:in `standard_exception_handling'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.1.0/lib/rake/application.rb:78:in `run'
/home/admin/pia-back/bin/rake:9:in `<top (required)>'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/home/admin/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
-e:1:in `<main>'
Tasks: TOP => db:migrate

This happens whichever the ENV i'm selecting, or even without any ENV selected.

creating production database fails

I am unable to create the production DB.
Test and Development database are created no problem

Running Ubuntu 18.04 LTS
Ruby 2.6.5
postgresql 12.1

rake:dbcreate

rake aborted!
ActiveRecord::AdapterNotSpecified: The development database is not configured for the development environment.

Available databases configurations are:

production
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/connection_specification.rb:251:in resolve_symbol_connection' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/connection_specification.rb:219:in resolve_connection'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/connection_specification.rb:140:in resolve' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/connection_handling.rb:187:in resolve_config_for_connection'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/connection_handling.rb:50:in establish_connection' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/railtie.rb:201:in block (2 levels) in class:Railtie'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in class_eval' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in block in execute_hook'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:62:in with_execution_control' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:67:in execute_hook'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:52:in block in run_load_hooks' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in each'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in run_load_hooks' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/base.rb:327:in module:ActiveRecord'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/base.rb:27:in <main>' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in require'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in require'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in block in require' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in load_dependency'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in require' /home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.2.1/lib/active_record/railties/databases.rake:19:in block (2 levels) in

'
/home/rb5864/pia-back/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in <top (required)>' /home/rb5864/.rvm/gems/ruby-2.6.5/bin/ruby_executable_hooks:24:in eval'
/home/rb5864/.rvm/gems/ruby-2.6.5/bin/ruby_executable_hooks:24:in `'
Tasks: TOP => db:create => db:load_config
(See full trace by running task with --trace)

NoMethodError: undefined method `split' for nil:NilClass

Hi,

I am trying to install the software pia and using your Runbook

Imho this guide is terrible, because the refered versions are too old and a lot of the used commands do not run out of the box and I had to do a lot of research to fix all the problems, but day for day I could find one more solution for the issues, but at the moment I am stuck.

I did
rake db:create

and it ran fine.

Afterwards I did

rake db:migrate

and I've got an error:

rake aborted!
NoMethodError: undefined method `split' for nil:NilClass

To give some more information:

OS: Ubuntu 18.04 LTS (server, no GUI)
ruby: 2.3.1
ruby-rails: 5.0.6
rvm: 1.29.7
rake: 12.3.1-1
gem: 1.1.1
bundler: 2.0.1
nodejs: 8.10.0
Any suggestions what I could do or can I add some additional information for debugging?

logs.tar.gz

Installation back-end: comment demander la validation?

Bonjour,

Tout d'abord, félicitations pour la première impression du logiciel: très professionnel, et la traduction en anglais, indispensable, est une très agréable surprise.

A fins de test, j'ai installé la version Back-End de PIA. Après avoir renseigné tous les champs, le bouton "Ask for review" ne semble pas s'activer. Si on exporte le projet et qu'on le réimporte en mode local, le bouton s'active. Par contre, il ne semble pas s'activer en mode back-end.

Configuration back-end:
4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Configuration application:
PIA application version 1.1.6 Linux 64 bits
PIA application version 1.1.7 Windows 64 bits

Cordialement,

No authentication is possible so not possible to deploy on internet

Hello

I am trying to setup this tool for our company (thanks for the work on this product !), and my first prerequisite it to deliver the tool on a internet url so it can be accessible for all employee that need to access it.

I have create a setup based on the docker work (thanks !)

But I am hitting an issue regarding privacy. If I add a simple http-auth on the backend then the frontend is not able to communicate with the backend (using this plugin for example).

How do you secure PIA backend actually ?

Can we use the backend/frontend solution from PIAlabs instead ? It seems to rely on Symfony and implement an auth system.

THANKS !

Mise en Production

Nous avons rencontrons encore une difficulté,
lors de la mise en oeuvre de l’environnement de PROD nous avons un message d'erreur
avec la commande
RAILS_ENV=production rake assets:precompile

celle-ci retourne l'erreur :
rake aborted!
Don't know how to build task 'assets:precompile' (see --tasks)

(See full trace by running task with --trace)

Autre point :
Est-il possible de faire fonctionner le serveur en mode Service (/etc/init.d...)?
Peut-on faire Tourner 2 Environnements (Test et Prod) ?

Ajout pièce jointe

En environnement de production, l'ajout de pièce jointe ne fonctionne pas.

Trace côté serveur :

I, [2017-12-01T15:49:56.475785 #29] INFO -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] Started POST "/pias/4/attachments" for 10.XX.XX.XX at 2017-12-01 15:49:56 +0000
I, [2017-12-01T15:49:56.477243 #29] INFO -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] Processing by AttachmentsController#create as /
I, [2017-12-01T15:49:56.477410 #29] INFO -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] Parameters: {"attachment"=>{"name"=>"hello world.pdf", "mime_type"=>"application/pdf",
"pia_id"=>"4", "pia_signed"=>"0", "file"=>"data:;base64,
[...]
U9GCg==", "created_at"=>"Fri Dec 01 2017 16:49:23 GMT+0100 (CET)"}, "pia_id"=>"4"}
D, [2017-12-01T15:49:56.478562 #29] DEBUG -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] (0.1ms) BEGIN
D, [2017-12-01T15:49:56.479827 #29] DEBUG -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] Pia Load (0.2ms) SELECT "pias".* FROM "pias" WHERE "pias"."id" = $1 LIMIT $2 [["id"
, 4], ["LIMIT", 1]]
D, [2017-12-01T15:49:56.481395 #29] DEBUG -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] SQL (0.5ms) INSERT INTO "attachments" ("pia_id", "created_at", "updated_at") VALUES (
$1, $2, $3) RETURNING "id" [["pia_id", 4], ["created_at", "2017-12-01 15:49:56.480274"], ["updated_at", "2017-12-01 15:49:56.480274"]]
D, [2017-12-01T15:49:56.503043 #29] DEBUG -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] (21.2ms) COMMIT
I, [2017-12-01T15:49:56.504206 #29] INFO -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] [active_model_serializers] Rendered AttachmentSerializer with ActiveModelSerializers::Ad
apter::Attributes (0.38ms)
I, [2017-12-01T15:49:56.504386 #29] INFO -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] Completed 500 Internal Server Error in 27ms (ActiveRecord: 21.9ms)
F, [2017-12-01T15:49:56.505141 #29] FATAL -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe]
F, [2017-12-01T15:49:56.505179 #29] FATAL -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] TypeError (no implicit conversion of nil into String):
F, [2017-12-01T15:49:56.505200 #29] FATAL -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe]
F, [2017-12-01T15:49:56.505239 #29] FATAL -- : [366c98cd-f51f-4976-a0e6-7d7b132b84fe] app/serializers/attachment_serializer.rb:7:in basename' [366c98cd-f51f-4976-a0e6-7d7b132b84fe] app/serializers/attachment_serializer.rb:7:in attached_file'
[366c98cd-f51f-4976-a0e6-7d7b132b84fe] app/controllers/attachments_controller.rb:26:in `create'

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.