0
Information at: [www.missingmethod.com/projects/community_engine](www.missingmethod.com/projects/community_engine)
0
@@ -17,94 +17,95 @@ Requirements:
0
aws-s3 (if using s3 for photos)
0
-G
ETTING COMMUNITY ENGINE RUNNING0
+G
etting CommunityEngine Running0
--------------------------------
0
1. From the command line
0
-
$rails site_name (create a rails app if you don't have one already)
0
+
$rails site_name (create a rails app if you don't have one already)
0
-
Install the engines plugin:
0
+
2. Install the engines plugin:
0
-
$ script/plugin install git://github.com/lazyatom/engines.git
0
+
$ script/plugin install git://github.com/lazyatom/engines.git
0
-
Put the community engine plugin into plugins directory (use one of the following methods):
0
+
3. Put the community engine plugin into plugins directory (use one of the following methods):
0
-
*If you're not using git, and just want to add the source files:*0
+
* If you're not using git, and just want to add the source files:0
-
Download a tarball from https://github.com/bborn/communityengine/tarball/master and unpack it into /vendor/plugins/community_engine
0
+
Download a tarball from https://github.com/bborn/communityengine/tarball/master and unpack it into /vendor/plugins/community_engine
0
-
*Using git, make a shallow clone of the community_engine repository:*0
+
* Using git, make a shallow clone of the community_engine repository:0
-
$ git clone --depth 1 git://github.com/bborn/communityengine.git vendor/plugins/community_engine
0
+
$ git clone --depth 1 git://github.com/bborn/communityengine.git vendor/plugins/community_engine
0
-
*If you want to keep your community_engine plugin up to date using git, you'll have to add it as a submodule:*0
+
* If you want to keep your community_engine plugin up to date using git, you'll have to add it as a submodule:0
-
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#submodules
0
+
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#submodules
0
-
Create your database and modify your `config/database.yml` appropriately.
0
+
4. Create your database and modify your `config/database.yml` appropriately.
0
-
Delete public/index.html (if you haven't already)
0
+
5. Delete public/index.html (if you haven't already)
0
-
Modify your environment.rb as indicated below:
0
+
6. Modify your environment.rb as indicated below:
0
- ## environment.rb should look something like this:
0
- RAILS_GEM_VERSION = '2.1' unless defined? RAILS_GEM_VERSION
0
- require File.join(File.dirname(__FILE__), 'boot')
0
- require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
0
+ ## environment.rb should look something like this:
0
+ RAILS_GEM_VERSION = '2.1' unless defined? RAILS_GEM_VERSION
0
+ require File.join(File.dirname(__FILE__), 'boot')
0
+ require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
0
- Rails::Initializer.run do |config|
0
- #resource_hacks required here to ensure routes like /:login_slug work
0
- config.plugins = [:engines, :community_engine, :white_list, :all]
0
- config.plugin_paths += ["#{RAILS_ROOT}/vendor/plugins/community_engine/engine_plugins"]
0
+ Rails::Initializer.run do |config|
0
+ #resource_hacks required here to ensure routes like /:login_slug work
0
+ config.plugins = [:engines, :community_engine, :white_list, :all]
0
+ config.plugin_paths += ["#{RAILS_ROOT}/vendor/plugins/community_engine/engine_plugins"]
0
- ... Your stuff here ...
0
- # Include your application configuration below
0
- require "#{RAILS_ROOT}/vendor/plugins/community_engine/engine_config/boot.rb"
0
+ ... Your stuff here ...
0
+ # Include your application configuration below
0
+ require "#{RAILS_ROOT}/vendor/plugins/community_engine/engine_config/boot.rb"
0
-
Modify each environment file (`development.rb`, `test.rb`, and `production.rb`) as indicated below:
0
+
7. Modify each environment file (`development.rb`, `test.rb`, and `production.rb`) as indicated below:
0
- # development.rb, production.rb, and test.rb should include something like:
0
- APP_URL = "http://localhost:3000" (or whatever your URL will be for that particular environment)
0
+ # development.rb, production.rb, and test.rb should include something like:
0
+ APP_URL = "http://localhost:3000" (or whatever your URL will be for that particular environment)
0
-
Modify your routes.rb as indicated below:
0
+
8. Modify your routes.rb as indicated below:
0
- # Add this after any of your own existing routes, but before the default rails routes:
0
- map.from_plugin :community_engine
0
- # Install the default routes as the lowest priority.
0
- map.connect ':controller/:action/:id'
0
- map.connect ':controller/:action/:id.:format'
0
+ # Add this after any of your own existing routes, but before the default rails routes:
0
+ map.from_plugin :community_engine
0
+ # Install the default routes as the lowest priority.
0
+ map.connect ':controller/:action/:id'
0
+ map.connect ':controller/:action/:id.:format'
0
-
Generate the community engine migrations:
0
+
9. Generate the community engine migrations:
0
-
$ script/generate plugin_migration
0
+
$ script/generate plugin_migration
0
+
10. From the command line:
0
-
You may need to change these lines in `application.rb` (if you're not using cookie sessions):
0
+
11. You may need to change these lines in `application.rb` (if you're not using cookie sessions):
0
- # See ActionController::RequestForgeryProtection for details
0
- # Uncomment the :secret if you're not using the cookie session store
0
- protect_from_forgery # :secret => 'your_secret_string'
0
+ # See ActionController::RequestForgeryProtection for details
0
+ # Uncomment the :secret if you're not using the cookie session store
0
+ protect_from_forgery # :secret => 'your_secret_string'
0
-
Run tests (remember, you must run `rake test` before you can run the community_engine tests):
0
+
12. Run tests (remember, you must run `rake test` before you can run the community_engine tests):
0
- $ rake community_engine:test
0
+ $ rake community_engine:test
0
-
Start your server and check out your site!
0
+
13. Start your server and check out your site!
0
To override the default configuration, create an `application.yml` file in `RAILS_ROOT/config`
0
@@ -114,7 +115,7 @@ This is where you can change commonly used configuration variables, like `AppCon
0
This YAML file will get converted into an OpenStruct, giving you things like `AppConfig.community_name`, `AppConfig.support_email`, etc.
0
By default CommunityEngine uses the filesystem to store photos.
0
@@ -128,11 +129,10 @@ Finally, you'll need an S3 account for S3 photo uploading.
0
Create an s3.yml file in RAILS_ROOT/config
0
------------------------------------------------------
0
CommunityEngine includes the `s3.rake` tasks for backing up your site to S3. If you plan on using these, you'll need to add a file in `RAILS_ROOT/config/s3.yml`. (Sample in `sample_files/s3.yml`)
0
CommunityEngine Users have a Role (by default, it's admin, moderator, or member)
0
@@ -148,33 +148,34 @@ There is a rake task to make an existing user into an admin:
0
(Pass in the e-mail of the user you'd like to make an admin)
0
1. Add a 'themes' directory in RAILS_ROOT with the following structure:
0
-2. Add
'theme: your_theme_name' to your application.yml (you'll have to restart your server after doing this)
0
+2. Add
`theme: your_theme_name` to your `application.yml` (you'll have to restart your server after doing this)
0
-3. Customize your theme. For example: you can create a
/RAILS_ROOT/theme/your_theme_name/views/shared/_scripts_and_styles.html.haml to override the default one, and pull in your theme's styleshees.
0
+3. Customize your theme. For example: you can create a
`/RAILS_ROOT/theme/your_theme_name/views/shared/_scripts_and_styles.html.haml` to override the default one, and pull in your theme's styleshees.
0
-
To get at the stylesheets (or images, or javascripts) from your theme, just add /theme/ when referencing the resource, for example:
0
+
To get at the stylesheets (or images, or javascripts) from your theme, just add /theme/ when referencing the resource, for example:
0
-
= stylesheet_link_tag 'theme/screen' # this will reference the screen.css stylesheet within the selected theme's stylesheets directory.
0
+
= stylesheet_link_tag 'theme/screen' # this will reference the screen.css stylesheet within the selected theme's stylesheets directory.
0
*Note: when running in production mode, theme assets (images, js, and stylesheets) are automatically copied to you public directory (avoiding a Rails request on each image load).*
0
Localization is done via an extended version of [Globalite](http://code.google.com/p/globalite/).
Comments
No one has commented yet.