Closed gtrias closed 8 years ago
After a while trying things I managed to fix the error but I'm not sure why.
I'm building a Docker image for BeaconControl (I can submit a pull request when It will be finished) so I was doing the configuration by hand. The case is that bin/setup
script did something and now the error is fixed but is not the ideal way to setup when you are dealing with docker images cause you have no interactivity.
What I was doing before to call bin/setup
_
bundle install
.rake db:create db:migrate
and then rake db:seed
. From a prior docker container overriding entrypoint.app/config.yml
and app/database.yml
by hand and mounting as a volume to docker image.Everything was working as expected but the edit and create controller actions that was raising this error. Do you know what step was missing to do by hand?
Hi @gtrias. Thanks for reporting this issue. The problem here is that rake tasks db:drop / create / purge don't load rails env so migrations_paths is set just to standard Rails migration folder (engine initialisers aren't called). You can check it here: https://github.com/rails/rails/blob/4-2-stable/activerecord/lib/active_record/railties/databases.rake
Executing bin/setup script solved the problem because each rake db: task is called separately. Please pull recent changes and check if your problem is solved now.
I'm having this error when I try to edit a Beacon on development environment:
The stack