2

我有一个 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 应用程序和生活应该很快乐,但事实并非如此。

VituralHost块中,我确实在路径的尽头有 publicDocumentRootDirectory; 选项包括:

全部允许 AllowOverride all Options -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 

我确实有 gem 行linecache19ruby-debug-base19并且ruby-debug19在 Gemfile 中。我有一种感觉,各种版本一起玩不好?我担心线路缓存错误和linechace19Gemfile 中的指定?但我需要linecache19解决一个不同的问题。

我也尝试过停止httpd服务并passenger在独立模式下运行:

passenger start -a 172.16.2.226 -p 80 -d -e development

我收到相同的“无法启动乘客”错误。

如果我将端口更改为 3000,我会502 Bad Gateway在 Firefox 中收到错误消息。

有人知道我哪里出错了吗?

4

0 回答 0