ROR通过passenger部署在apache上遇到的问题,求救!

vive 2013-01-11 06:03:13
页面上报告We're sorry, but something went wrong. 查log, 指定了passenger输出的log文件,内容如下:

[ pid=1298 thr=140701253511136 file=ext/apache2/Hooks.cpp:1411 time=2013-01-11 17:51:48.553 ]: Initializing Phusion Passenger...
[ pid=1298 thr=140701253511136 file=ext/apache2/Hooks.cpp:1686 time=2013-01-11 17:51:48.569 ]: Shutting down Phusion Passenger...
[ pid=1307 thr=139804418029536 file=ext/common/LoggingAgent/Main.cpp:283 time=2013-01-11 17:51:48.569 ]: Logging agent online, listening at unix:/tmp/passenger.1.0.1298/generation-0/logging.socket
[ pid=1317 thr=140701253511136 file=ext/apache2/Hooks.cpp:1411 time=2013-01-11 17:51:48.603 ]: Initializing Phusion Passenger...
[ pid=1327 thr=140495424186336 file=ext/common/LoggingAgent/Main.cpp:283 time=2013-01-11 17:51:48.624 ]: Logging agent online, listening at unix:/tmp/passenger.1.0.1317/generation-0/logging.socket
[ pid=1322 thr=140154217510656 file=ext/common/ApplicationPool/Pool.h:939 time=2013-01-11 17:51:51.415 ]: Spawning a process for /var/www/GoChessWeibo because there are none for this app group
[ pid=1322 thr=140154217510656 file=ext/common/ApplicationPool/../SpawnManager.h:289 time=2013-01-11 17:51:51.415 ]: Spawning a new application process for /var/www/GoChessWeibo...
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
[ pid=1322 thr=140154217510656 file=ext/common/ApplicationPool/../SpawnManager.h:410 time=2013-01-11 17:51:53.594 ]: Application process 1357 spawned
[ pid=1322 thr=140154217510656 file=ext/common/Process.h:117 time=2013-01-11 17:51:53.594 ]: Application process 1357 (0x7f782c002b50): created.
[ pid=1334 thr=140701253511136 file=ext/apache2/Hooks.cpp:690 time=2013-01-11 17:51:53.595 ]: Forwarding /users/4 to PID 1357
[ pid=1357 thr=7000200 file=abstract_request_handler.rb:244 time=2013-01-11 17:51:53.596 ]: Entering request handler main loop
[ pid=1357 thr=7000200 file=abstract_request_handler.rb:469 time=2013-01-11 17:51:53.596 ]: Accepting new request on main socket
cache: [POST /users/4] invalidate, pass
基本上找不到有用的报错信息。
代码里面调用puts, 内容是会输出在这个log里面的。可是正常的rails报错跑哪里去了呢?
请各位大神帮帮忙,给点线索,我应该去哪里找error log呢?apache那边的log也没有有用的错误信息。
...全文
473 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
babyding 2013-01-25
  • 打赏
  • 举报
回复
This issue has been fixed? if not, first, you need to check Apache log, and than check Rails log. if there's passenger error, the webpage will show something about passenger error information. for now, you got the rails error page. maybe some error in your rails app. we just need to check the rails log. not passengers. in the different environment the log level is different. logger.info, logger.debug, logger.error etc. secondly, we don't use passenger standalone to start server. we just need to care about Apache. passenger is embed in apache. Add some configuration in the apache config file. And start/stop appache server. if we want to restart rails server, just refresh the restart.txt in the rails_root/tmp folder. passenger will check the update time of the rails_root/tmp/restart.txt. if its time has been refreshed, passenger will restart rails server. Then will just need to check rails log in the rails_root/log folder and apache log in its log folder. that's all, it's very easy. most jobs has been handled by rails and passenger.
vive 2013-01-18
  • 打赏
  • 举报
回复
好吧搞定了之后我还是来说一声吧。 必须另开一个帐号,不能用root启动passenger. passenger看到帐号是root,就会自动采用nobody帐号启动。 如果不指定帐号,passenger会看config/environment.rb这个文件是谁的,就用哪个帐号启动;如果是root, 就用nobody帐号启动。 而nobody帐号不大可能对数据库有写权限,于是悲剧发生了... 最近几天又反复出这个问题,然后我去ls -l检查production.sqlite3, 发现所有者是root, 明白了,因为我经常用root登录进去,然后rake db:drop, rake db:migrate, 所以建立出来的文件就成了root所有... 然后再用chown改回来吧就行了
healer_kx 2013-01-15
  • 打赏
  • 举报
回复
mark,等你搞定了,我就会了。

2,763

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ruby/Rails
社区管理员
  • Ruby/Rails社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧