简体   繁体   中英

Ruby on Rails server stopped working

I am new in ror developement..i was working on a LIVE server...I just uploaded a file through sftp...after 1 day server suddenly stopped working...You can see the error message from here

it shows

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.

Looking at the error page you seem to be using Rails 2.3? At a guess you have a MySQL database not an SQLite running. You should have the user name and password for the database around somewhere (replace the relevant fields in the 3 sections with them).

Change the database names to reflect your database names.

The server admins might have set a specific socket for MySQL in which case replace the '/tmp/mysql.sock' with the socket number.

Check your Gems to see if the MySQL adapter is installed (you appear to be using Rails 2.3 so try gem list on the terminal for your server - make sure that you are in the root directory for the app). If the MySQL gem is missing use gem install to install it (this will depend on what your hosting provider allows).

The following links are pretty old - targetted towards Rails 2 which you appear to be using.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM