これに続いてApacheでRailsプロジェクトをセットアップし、次を実行しました
1. (Create the project) rails new myproject
2. (Restart Apache Server) service apache2 restart
3. (Edit Gemfile) append "gem 'therubyracer'" (Without this gem, running the 'rake' command gives an error about JavaScript)
4. (Install Bundle) bundle install
5. (Create Database) rake db:create
6. (Generate Controller) rails generate controller sites new
7. (Migrate Database) rake db:migrate
すべてのステップが問題なく実行されました。手順 6 から、コントローラーとビューにファイルが設定され、routes.rb ファイルが変更されます。しかし、sites/new
私のウェブサイトにアクセスすると、500.html
ページが表示されます(内部サーバーエラー)。public
ディレクトリ内のファイルに問題なくアクセスできます。
それはなぜでしょうか?何を確認すればよいですか?
編集:私は設定config.consider_all_requests_local = true
しましたproduction.rb
が、エラーメッセージが表示されます。それは言う
`SQLite3::CantOpenException
unable to open database file`