SQLite3:CantOpenException (unable to open database file)
I have FreeBSD setup with Apache 2 and passenger. To test things out I created a test app using the standard Ra开发者_StackOverflow中文版ils new test_app. When I try to access the site through Apache I get the error listed in the title above in the production.log, if I run the Rails server from the test_app directory it works fine.
I only have one controller and view in the app right now just a home controller and index view, I am not even accessing a database.
In apache, it's running in production mode vs. development mode when running rails server. You probably have either incorrect information in your database.yml for production, or haven't run rake db:create yet. 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.
Is your server running at the same time? I ve got an error and it disappeared when I stopped server.
精彩评论