Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
ruby-taiwan.org website source code. # master 追 ruby-china , production 才是 ruby-taiwan

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db
doc
lib
public
script
spec
vendor
.gitignore
.rspec
.rvmrc
Capfile
Gemfile
Gemfile.lock
README.markdown
Rakefile
config.ru

README.markdown

This is source code of Ruby China Group

Install

  • You need to install Ruby 1.9.2, Rubygems and Rails 3.1 first.
  • Install and start Redis, MongoDB, memcached, Python, Pygments

    cp config/config.yml.default config/config.yml
    cp config/mongoid.yml.default config/mongoid.yml
    cp config/redis.yml.default config/redis.yml
    cp config/mailman.yml.default config/mailman.yml
    bundle install
    bundle update rails
    rake assets:precompile
    thin start -O -C config/thin.yml
    ./script/resque start
    ./script/mailman start
    easy_install pygments # 或者 pip install pygments
    

    Initialize Gollum Repository:

    mkdir doc/wiki_repo
    cd doc/wiki_repo
    git init
    

Deploy

$ cap deploy
$ cap production remote_rake:invoke task=db:setup

OAuth

Apply Google JSAPI

麵包屑

in controller

drop_breadcrumb("A Level")
drop_breadcrumb("B Level")

Menu

render_list :class => "menu" do |li|
  li << link_to("Home", "/")
end

Bootstrap CSS version

1.4.0

Bootstrap Form

https://github.com/rafaelfranca/simple_form-bootstrap/blob/master/config/initializers/simple_form.rb

Memcached

Dalli requires memcached 1.4.x +

Mailman

如要啟動電郵回覆功能,請啟動 ./script/mailman

要設定 ./config/mailman.yml 到適當的 pop3 電郵,如果使用 gmail ,請確認已啟動 pop3接收郵件功能。

Helpers

render_topic_title(topic)

Common Partial

  • common/user_nav : user_navigation_bar

Facebook Share

facekbook_enable: false by default

Styling Guide

  • Don't put plain html in helper
  • NEVER LOGIC in View
  • 重複用到的方法請隨手用 Helper 包
  • 永遠使用括號 () 包覆複雜 Helper

Wiki Repo

  • DEV:

ln -s "absolute path" doc/wiki_repo

  • PRODUCTION:

add in config/deploy.rb run "ln -sf #{deploy_to}/shared/doc/wiki_repo #{deploy_to}/current/doc/wiki_repo"

Contributors

Thanks

Forked from Homeland Project

Something went wrong with that request. Please try again.