如何配置Rails 3.1应用程序在特定目录(如"/ r")下运行?
我试过在config.ru:
map '/r' do
run Debtor::Application
end
Run Code Online (Sandbox Code Playgroud)
但刚刚返回"未找到:/ r"
为了使它工作,我不得不将所有路由括在一个范围内:
scope '/r' do
#routes
end
Run Code Online (Sandbox Code Playgroud)
并将以下行添加到config/applcation.rb
config.assets.prefix = "/r/assets"
Run Code Online (Sandbox Code Playgroud)
并将我的jquery ui css文件从/ stylesheets移动到/ r/stylesheets.
这似乎太复杂了.是不是有一个更简单的方法?为什么我的config.ru设置不起作用?
我的用例是为wordpress服务器安装一个有轨的电源ajax后端.