Rails开发的CMS系统 BrowserCMS


http://www.browsercms.org/

BrowserCMS supports larger teams of editors, has a robust set of features as part of its core, allows for varied permission models, and is customizable via modules.

BrowserCMS 是一个基于 Rails 框架开发的 CMS 系统,支持大量的编辑者同时编辑文章,其核心非常稳定可靠、强大的权限控制模块,可通过模块进行功能定制。

文档:

There are a number of ways to get familiar with BrowserCMS. These include:

  1. Reference Guides - The general 'how to' articles. A good place for new users to learn what BrowserCMS has to offer and to create projects.
  2. APIs - The Complete API documentation for BrowserCMS.
  3. Wiki - A place for community generated documentation and helpful tips. (GitHub Wiki)
  4. Mailing List - Where the community Q&A happens. (Google Groups)
  5. Report a Bug - The place to post confirmed problems, bugs or new ideas. (Github Issue)

教学视频:See our Presentation from Acts As Conference 2009 to see some of the insight into how BrowserCMS works.


The purpose of this guide is help new developers get up and running with BrowserCMS. It covers how to:

  • Install the BrowserCMS gem
  • Create a demo project to explore BrowserCMS
  • Create a blank project for building a website from scratch

This guide is valid for BrowserCMS 3.3. See Getting Started: 3.1 for an older guide.

This Guide Assumes

Before you can create a project using BrowserCMS, you will need to have the following installed.

  1. The Ruby Language (Version 1.9.2 or later)
  2. The Rails framework (For gem versions of browsercms use 3.0.×. Rails 3.1 works in the master branch)
  3. A working installation of SQLite or MySQL as well as the gems for your database of choice.

Starting a demo project

This section of the guide will cover creating a sample website with BrowserCMS, using a demo website layout and content.
The goal is to give you some content and templates to play with to explore the CMS. Later sections of this guide will
cover the more common cases where you are creating a new website from scratch and want only the bare minimums.

Installing BrowserCMS

BrowserCMS is packaged as a gem which can be included in any Rails project. To install the gem, do the following:

$ gem install browsercms
Creating a Demo Website

Run the following from your terminal window.


$ bcms demo project_name
$ cd project_name
$ rake db:install
$ rails server

This will create a BrowserCMS project which used SQLite as the data storage. You need to have the sqlite3-ruby gem installed for this to work.

Using your Site

Open your browser to http://localhost:3000/cms to log into the admin for the CMS. Enter the default username/password (in development mode) is username=cmsadmin, password=cmsadmin. You should be now be logged in, viewing the home page of the site. You can now edit or add new content via the admin interface.

To learn more about the types of things you can do with BrowserCMS, see the User's Manual.

Starting a ‘Real’ project

Demo sites are fine for learning the ropes, but when its time to start working on a ‘real’ project, you don’t want a lot
of dummy data that needs to be cleaned out. To start a typical, ‘blank’ project, you can run the following command. Here
we will specify the -d flag, which will use MySQL as the database.

Run the following:


$ bcms new project_name -d mysql
$ cd project_name
$ rake db:install
$ rails server

You need to have the mysql gem installed for this to work. This is going to create the development and testing copies of
the database, migrate the db, populate it with the bare minimum content it needs, and copy all of the necessary files
from the gem into the rails project. Open your browser to http://localhost:3000/cms to log in,
using cmsadmin/cmsadmin as the username/password.

Alternative command

There is a longer version of the command line script, which works identically to the shorter form detailed above.

$ browsercms new project_name -d mysql

No difference in functionality, just slighly more to type.

Getting Command line Help

You can get assistance from the commandline tool by running the bcms command with no arguments, like so:

$ bcms

This will show common usages, as well as all the help options available. The browsercms command piggybacks on top of the
rails command, so many of the options available are the same as rails, including -f or —force.

Trouble Shooting

This section covers some potential problems you might run into when trying to create a BrowserCMS project.

Creation fails to create MySQL Database

BrowserCMS will attempt to create and populate the database when you invoke rake db:install. When running against mysql, Rails will assume you have a username called root with an empty password. The database create/migrations will fail if you don’t have that username/password set. If this occurs, you can update the config/database.yml with correct username/password before your runrake db:install

Deploying to Production

Once you get ready to start deploying your application into production environments, be sure to review the Deployment Guide. There are several ‘gotchas’ to be aware of that may differ from deploying other Rails applications.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值