LoginSignup
4
4

More than 5 years have passed since last update.

Rails4対応CMS「ComfortableMexicanSofa」のプロジェクト作成方法

Posted at

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で、ページを作成することができます。

  • ログイン画面

ログイン画面.png

  • ページ作成画面

ページ作成.png

参考URL

ComfortableMexicanSofa (GitHub)
https://github.com/comfy/comfortable-mexican-sofa

RubyGems
https://rubygems.org/gems/comfortable_mexican_sofa

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4