SQLite3: CantOpenException (uanble to open a database file)

I have a FreeBSD installation with Apache 2 and a passenger. To test the situation, I created a test application using the standard rails new test_app. When I try to access the site through Apache, I get the error indicated in the header above in the production.log file, if I start the rails server from the test_app directory, it works fine.

I have only one controller and view in the application right now, only the home controller and index view, I do not even access the database.

Any help is appreciated.

+4
source share
2 answers

In apache, it runs in production or development mode when the rails server starts. You probably have either incorrect information in your .yml database for production, or rake db: create is not yet running. Check your config / database.yml and make sure the settings under production are correct, and if so, run rake db: create and rake db: migrate.

+4
source

Does your server work at the same time? I have an error and it disappeared when I stopped the server.

0
source

Source: https://habr.com/ru/post/1345487/


All Articles