简体   繁体   English

Ruby on Rails服务器停止工作

[英]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 我是ror开发的新手..我在LIVE服务器上工作...我刚刚通过sftp上传文件...在1天后服务器突然停止工作...您可以从这里看到错误消息

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? 查看错误页面,您似乎正在使用Rails 2.3? At a guess you have a MySQL database not an SQLite running. 猜测您有一个MySQL数据库而不是SQLite在运行。 You should have the user name and password for the database around somewhere (replace the relevant fields in the 3 sections with them). 您应该在某处附近有数据库的用户名和密码(用它们替换3部分中的相关字段)。

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. 服务器管理员可能已经为MySQL设置了特定的套接字,在这种情况下,请用套接字号替换“ /tmp/mysql.sock”。

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). 检查您的Gems以查看是否已安装MySQL适配器(您似乎正在使用Rails 2.3,因此请在服务器的终端上尝试gem列表-确保您位于应用程序的根目录中)。 If the MySQL gem is missing use gem install to install it (this will depend on what your hosting provider allows). 如果缺少MySQL gem,请使用gem install进行安装(这取决于您的托管服务提供商允许的内容)。

The following links are pretty old - targetted towards Rails 2 which you appear to be using. 以下链接非常古老-定位于您似乎正在使用的Rails 2。

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

http://forums.mysql.com/read.php?116,353922,359544 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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