0

私は ror 開発の初心者です..私は LIVE サーバーで作業していました.sftp 経由でファイルをアップロードしたところです.1 日後にサーバーが突然動作しなくなりました.ここからエラーメッセージを確認できます.

それが示している

There appears to be a database problem.

Your config/database.yml may not be written correctly. Please check it and fix any errors.
Your database schema may be out of date or nonexistant. Please run rake db:migrate to ensure that the database schema is up-to-date.
The database server may not be running. Please check whether it's running, and start it if it isn't.
4

1 に答える 1

0

Rails2.3を使用しているように見えるエラーページを見てください。推測では、SQLiteではなくMySQLデータベースが実行されています。データベースのユーザー名とパスワードはどこかにあるはずです(3つのセクションの関連フィールドをそれらに置き換えてください)。

データベース名を反映するようにデータベース名を変更します。

サーバー管理者がMySQLに特定のソケットを設定している可能性があります。その場合、「/ tmp/mysql.sock」をソケット番号に置き換えます。

Gemsをチェックして、MySQLアダプターがインストールされているかどうかを確認します(Rails 2.3を使用しているように見えるので、サーバーのターミナルでgemリストを試してください。アプリのルートディレクトリにいることを確認してください)。MySQL gemが見つからない場合は、gem installを使用してインストールします(これは、ホスティングプロバイダーが許可する内容によって異なります)。

次のリンクはかなり古いものです-使用しているように見えるRails2を対象としています。

http://www.ruby-forum.com/topic/139710

http://forums.mysql.com/read.php?116,353922,359544

database.yml

development:
  adapter: mysql
  encoding: utf8
  database: temp_development
  username: root
  password:
  socket: /tmp/mysql.sock

# 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: mysql
  encoding: utf8
  database: temp_test
  username: root
  password:
  socket: /tmp/mysql.sock

production:
  adapter: mysql
  encoding: utf8
  database: temp_production
  username: root
  password:
  socket: /tmp/mysql.sock
于 2012-05-08T10:09:58.847 に答える