【发布时间】:2011-08-23 20:24:10
【问题描述】:
我正在将nesta (0.9.8) cms 添加到现有的Rails 3.0.10 应用程序中。我让博客启动并运行,但布局/样式表没有。
到目前为止我所做的是:
1. 在 Rails 应用程序主根目录中,添加 gem 'nesta'、gem 'sass' 并运行
'捆绑'
2.运行“内斯塔新内斯塔博客”
3. 编辑 config.ru 如下:
require ::File.expand_path('../config/environment', __FILE__)
map "/" do
run MyRails3App::Application
end
require 'nesta/env'
require 'nesta/app'
Nesta::App.root = ::File.expand_path('./nesta-blog', ::File.dirname(__FILE__))
map "/blog" do
run Nesta::App
end
4。编辑 config/routes.rb 如下:
require 'nesta/env'
require 'nesta/app'
Rails3MongoidOmniauthSimple::Application.routes.draw do
mount Nesta::App.new => "/blog"
root :to => "home#index"
...
5。 cd内斯塔博客
6.运行nesta demo:content
现在,如果您从 ~/main-rails-app 运行 rails s,转到 http://localhost:3000/blog,您将看到演示内斯塔站点,但没有他的默认布局/样式表,而如果您从 ~/main-rails-app 运行 shotgun config.ru在 ~/main-rails-app/nesta-blog 中,转到 http://localhost:9393/ 一切都正确显示。
有什么建议吗?
提前致谢 卢卡·G·索阿夫
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-3 content-management-system nestacms