【问题标题】:Apache showing directory structure of public folder of my Rails Application! Why isnt the application Run?Apache 显示我的 Rails 应用程序的公共文件夹的目录结构!为什么应用程序不运行?
【发布时间】:2011-07-30 21:42:08
【问题描述】:

我有一个安装了所有依赖项的 Ubuntu LTS Lamp Stack 32 位,用于运行 rails 应用程序。我已经使用 Capistrano 部署了我的 Rails 应用程序。应用程序转到我服务器上的正确目录,并且当前文件夹与我的应用程序一起添加在其中。但是,当我访问该浏览器的公共目录时,我只会得到一个目录列表,而不是运行应用程序!

为了设置我的服务器,我使用了 https://github.com/ryanb/railscasts/wiki/Server-Setup 上的 Ryan Bates 教程。

我正确地运行了 cap deploy:setup 然后 cap deploy (因为该应用程序已经很好地出现了)

我在部署应用程序后也运行了 bundle install 并在路由文件中指定了默认路由(还删除了我的公共文件夹中的 index.html)要自己查看应用程序,请转到 http://scottietom.mooo.com/rails

如您所见,您只能看到目录。

有什么想法吗? 提前致谢。汤姆。

【问题讨论】:

  • 你有兴趣在 Nginx 和 Unicorn 上做这件事吗? techbot.me/2010/08/…
  • 是的,这可能是一种可能性,但我认为我与 capistrano 非常接近。我认为我做错了可能是一件小事。

标签: ruby-on-rails ruby ruby-on-rails-3 capistrano


【解决方案1】:

这听起来像您没有启用乘客模块。仔细检查您的 Apache 配置,看看是否是这种情况。

【讨论】:

  • Passenger 已完全安装。我已经运行并包含:LoadModulepassenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/ext/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/ 1.9.1/gems/passenger-3.0.7 PassengerRuby /usr/local/bin/ruby 在我的 apache 配置文件中。
  • 根据official docs检查您的权限和多视图
猜你喜欢
  • 1970-01-01
  • 2014-02-08
  • 1970-01-01
  • 2014-08-14
  • 2014-06-03
  • 2012-04-01
  • 1970-01-01
  • 2015-08-03
  • 2010-12-28
相关资源
最近更新 更多