当我在Apache上运行新创建的Rails应用程序时,我只能访问它的默认首页(标准app/public/index.html)文件。当我尝试通过URI运行自定义方法时,我找不到页面。所以我猜测我的.htaccess出了问题。我必须为每个控制器“打开”它吗?Ruby on Rails .htaccess问题
RewriteCond %{HTTP_HOST} ^example.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^main(.*) "http\:\/\/127\.0\.0\.1\:12005\/$1" [P,L]
编辑: 我加入杂种日志
Error calling Dispatcher.dispatch #<NoMethodError: private method `split' called for nil:NilClass>
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/cgi_process.rb:52:in `dispatch_cgi'
MVC与路由无关。 – Gumbo 2010-09-09 11:55:26
我无法在我的托管服务器上安装乘客宝石。 – 2010-09-09 12:00:38
Mongrel + apache? Interessting设置...你不能使用乘客或独角兽(与nginx)?会让事情变得更容易... – Reactormonk 2010-09-09 15:49:46