Rubyのインストール
環境:Ubuntu 14.04LTS
- RVMのインストール
$ curl -sSL https://get.rvm.io | bash
$ source /home/(UserName)/.rvm/scripts/rvm
- Ruby2.1.2のインストール
$ rvm install 2.1.2
$ rvm default 2.1.2
$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
ComfortableMexicanSofa CMSプロジェクト作成
- 必要なモジュール・Gemをインストール
$ sudo apt-get install libxml2-dev libxslt2-dev nodejs
$ gem install bundler
$ gem install comfortable_mexican_sofa --no-ri --no-rdoc
- Railsプロジェクトを作成
$ rails new mycms
$ cd mycms
- Gemfileに追記
gem 'comfortable_mexican_sofa'
- ビルド
$ bundle install
$ rails generate comfy:cms
- 以下のようなロゴが表示させる
____ __ _ _ _
/ ___|___ _ __ ___ / _| ___ _ __| |_ __ _| |__ | | ___
| | / _ \| '_ ` _ \| |_ / _ \| '__| __/ _` | '_ \| |/ _ \
| |__| (_) | | | | | | _| (_) | | | || (_| | |_) | | __/
\____\___/|_| |_| |_|_| \___/|_| \__\__,_|_.__/|_|\___|
__ __ _ ____ __
| \/ | _____ _(_) ___ __ _ _ __ / ___| ___ / _| __ _
| |\/| |/ _ \ \/ / |/ __/ _` | '_ \ \___ \ / _ \| |_ / _` |
| | | | __/> <| | (_| (_| | | | | ___) | (_) | _| (_| |
|_| |_|\___/_/\_\_|\___\__,_|_| |_| |____/ \___/|_| \__,_|
- db:migrateの実行
$ rake db:migrate
- Rails Serverの起動
$ rails s
動作確認
「localhost:3000/admin/」にアクセスして、以下のユーザー名とパスワードを入力します。
ユーザー名:username
パスワード:password
以下のようなUIで、ページを作成することができます。
- ログイン画面
- ページ作成画面
参考URL
ComfortableMexicanSofa (GitHub)
https://github.com/comfy/comfortable-mexican-sofa