Getting StartedThe purpose of this guide is help new developers get up and running with BrowserCMS. It covers how to:
1 Installing BrowserCMSBrowserCMS is packaged as a gem, which can be included in any Rails project. The gem contains the code for the cms application itself, as well as public assets, including stylesheets, images and javascript. These assets will be copied from the gem into your project as part of the install process. The gem is hosted at RubyForge, so you can install it by doing: $ sudo gem install browsercms 1.1 Things you need firstBefore you can create a project using BrowserCMS, you will need to have the following installed. 1. Rails 2.3 (or later) – We make use of some of the newer features from Rails like application generator templates. 2. A Database – Either Mysql or the Sqlite gems should be installed. 2 Trying out BrowserCMSThis section will cover how to create a demo project using BrowserCMS, so you can play around with it. It will create a sample project, with some pages and content to play around with. You will need to choose one of the following options, depending on which database you want to use. 2.1 With SQLite3$ rails my_new_project_name -m http://browsercms.org/templates/demo.rb
$ cd my_new_project_name
$ script/server By default, Rails assumes that if you do not specify a -d flag, that you want to use SQLite as your project’s database. You need to have the sqlite3-ruby gem installed for this to work. 2.2 With MySQL$ rails my_new_project_name -d mysql -m http://browsercms.org/templates/demo.rb
$ cd my_new_project_name
$ script/server Here we specify the -m mysql flag to rails, which will create our project using MySQL. You need to have the mysql gem installed for this to work. 2.3 Using your SiteOpen 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 Guide. 3 Starting a ‘Real’ projectDemo 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. Using Rails’ 2.3 application template feature, we have a blank template (templates/blank.rb) which will create a more stripped down version of site. BrowserCMS projects are started like any other Rails project, using an application generator template, which is hosted on github. Assuming you want to use MySQL as the database. Run the following: $ cd ~/projects
$ rails my_new_project_name -d mysql -m http://browsercms.org/templates/blank.rb
$ cd my_new_project_name
$ script/server 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. |