LoginSignup
2
4

More than 5 years have passed since last update.

[管理画面]Spina(v1.0.3)を触りだけやってみた

Last updated at Posted at 2018-07-08

目的

  • サクッと作れるらしんでやってみたことをメモ
  • Spinaのコンセプト「Spina CMS A beautiful CMS for Rails developers.」
  • SpinaのGitHub

条件

  • ruby 2.5.0
  • Rails 5.2.0
  • psql (PostgreSQL) 10.4
  • spina (v1.0.3)

[DB]MacにPostgreSQLをインストールする方法

手順

  1. プロジェクトフォルダを作成し、Spina関連のGemを導入
  2. Gemをインストール後、指定されたコマンドで必要なファイルを作成
  3. サーバーを起動してViewを確認

1. プロジェクトフォルダを作成し、Spina関連のGemを導入

プロジェクトファイルを作成し、移動
mkdir spina-sample && cd $_
お決まりのnew/DBはpostgresql
rails _5.2.0_ new ./ -B -d postgresql --skip-turbolinks --skip-test
Gemfile
# 下記を追加
gem 'spina'
お決まりのbundle
bundle install --path vendor/bundle --jobs=4

[開発環境]プロジェクトごとにrailsの開発環境を設定する方法

2. Gemをインストール後、指定されたコマンドで必要なファイルを作成

DB周りの初期設定を実行
rails db:setup
spinaに必要な設定を行う
# GitHubのREADMEを参照

rails g spina:install

----
# 途中、サイト名/テーマ/メール/パスワードを聞かれます
What would you like to name your website? [MySite] ()test-site
What theme do you want to use? (default/demo) [default] ()デフォルトなら[enter]
Please enter an email address for your first user: [admin@domain.com] ()test@sample.com
Create a temporary password: [password] ()111111
---

# 最後に登録内容が表示される
Your Spina site has been succesfully installed!

Restart your server and visit http://localhost:3000 in your browser!
The admin backend is located at http://localhost:3000/admin.

Site name      :  test-site
Active theme   :  default
User email     :  test@sample.com
User password  :  111111

3. サーバーを起動してViewを確認

サーバー起動
rails s

管理画面ログイン(http://localhost:3000/admin/login)

Image from Gyazo

管理画面

Image from Gyazo

最後に

驚くほど簡単にできた。というか、ほぼコマンド入力のみの作業だけで終了した
カスタマイズするにはもっとやらないといけないけど、今はそんな時間ないので時がきたらやります。

2
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
2
4