我有一个Rails 3.0.7应用程序,在Webrick下的Windows 7机箱上的开发模式下运行良好。
我开始将其转移到基于ESX 4.2,CentOS 6.2,Apache 2.2.15,Ruby 1.9.3p125,Rails 3.2.3和乘客3.0.11以及mysql 14.14的生产主机。各种安装似乎都很干净。捆绑安装很干净,我运行bundle exec rake db:migrate
,它也运行干净。
我是Apache / passenger / rails环境的新手,可能无法理解如何正确配置所有这些。我已经阅读了很多关于这个问题的帖子,并按照这些想法取得了一些进展,但我仍然有一个错误。据我了解,如果你将vituralhost
块添加到Apache配置文件,它应该启动passenger
并找到rails app并且生活应该很开心,但事实并非如此。
在VituralHost
区块中,我确实在路径末尾公开了DocumentRoot
和Directory
;选项包括:
允许所有人 AllowOverride all 选项-MultiViews
从Win7主机上的firefox我输入172.16.2.226
并获取:
Ruby (Rack) application could not be started
These are the possible causes:
There may be a syntax error in the application's code. Please check for such errors and fix them.
A required library may not installed. Please install all libraries that this application requires.
The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.
Error message:
git://github.com/mark-moseley/linecache (at master) is not checked out. Please run `bundle install` (Bundler::GitError)
Exception class:
PhusionPassenger::UnknownError
Application root:
/var/www/html/Scarfs
我在Gemfile中有linecache19
,ruby-debug-base19
和ruby-debug19
的宝石行。我觉得各种各样的情况不能很好地融合在一起?我关注linecache错误并在Gemfile中指定linechace19
?但是我需要linecache19
来解决另一个问题。
我还尝试停止httpd
服务并在独立模式下运行passenger
:
passenger start -a 172.16.2.226 -p 80 -d -e development
我得到的相同“乘客无法启动”错误。
如果我将端口更改为3000,我在Firefox中会出现502 Bad Gateway
错误。
有人知道我哪里出错了吗?