生成命令后Rails内部服务器错误

时间:2013-06-14 16:50:44

标签: ruby-on-rails

我刚刚在this之后在Apache上设置了一个Rails项目并运行了以下

sudo /var/lib/gems/1.8/bin/rails generate controller sites new
  create  app/controllers/sites_controller.rb
   route  get "sites/new"
  invoke  erb
  create    app/views/sites
  create    app/views/sites/new.html.erb
  invoke  test_unit
  create    test/functional/sites_controller_test.rb
  invoke  helper
  create    app/helpers/sites_helper.rb
  invoke    test_unit
  create      test/unit/helpers/sites_helper_test.rb
  invoke  assets
  invoke    coffee
  create      app/assets/javascripts/sites.js.coffee
  invoke    scss
  create      app/assets/stylesheets/sites.css.scss

但是,访问我网站上的sites/new会显示500.html页面(内部服务器错误)。我可以很好地访问public目录中的文件,例如422.html500.html。我查看了log/development.log的日志,它只有一行

Connecting to database specified by database.yml

可能导致此问题的原因是什么?

编辑:我的database.yml文件:

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3

0 个答案:

没有答案