How to get started with Spina CMS


You've decided to try out Spina CMS. Awesome! Getting started is easy, the only thing you need is a terminal and a code editor.

In case you're new to Ruby and/or Rails, make sure you install all the necessary software first. It helps if you're familiar with Rails development, but it's not a hard requirement to get started with Spina CMS.

You can find many guides online on how to install Ruby/Rails, but it can be hard to find the right one. Instead of Googling and scouring Stack Overflow, you can skip all that and visit GoRails: Install Ruby On Rails.

Spina requires Ruby 2.7+, Rails 6+ and PostgreSQL

Installing Spina


All set? Nice.

Spina doesn't include its own project generator (yet). That means we'll begin by creating a new Rails app first. Open your terminal and use cd to navigate to your desired projects folder. After that run this command:

> rails new mywebsite --database=postgresql

请注意我们设置了PostgreSQL数据库

修改你的config/database.yml 为正确的数据库链接配置,然后运行下面的命令创建数据库

> rails db:create

在Gemfile里面增加 spina的gem包,指定版本号避免未来自动升级带来的问题。
gem 'spina', '~> 2.10'
可以通过undele update spina来升级
> bundle install

图片和上传
rails active_storage:install

安装 Spina
rails g spina:install

几个简单的配置询问
阅读量: 418
发布于:
修改于: