SpinaCMS / Spina

Spina CMS
http://www.spinacms.com
Other
2.19k stars 405 forks source link

Installation fails + docs error #899

Closed rubydesign closed 2 years ago

rubydesign commented 2 years ago

Looking good, so i want to try, but installation fails. ruby 2.6.7 , rails 5.2.7 + 6.1.4 , tried both with a new rails app

after the generator runs, the migration fails at the mobility initialiser spina/config/initializers/mobility.rb:2:in <main>: undefined method config for Mobility:Module

Looking at the mobility readme it seems to have a different (dsl) syntax. Maybe version problem? My mobility is 1.2.4

As aside: The install docs on https://spinacms.com/docs/getting-started/installing-spina have a rails spina:install , which i think may be missing a g after rails

Bramjetten commented 2 years ago

Are you perhaps using an old version of Spina? The current Mobility config in Spina should look like this:

Mobility.configure do
  plugins do
    backend :table
    active_record
    reader
    writer
    backend_reader
    query
    cache
    presence
    fallbacks false # default to false, enable if passed fallbacks: true
    locale_accessors
    default
  end
end
rubydesign commented 2 years ago

ok thanks for answering. I don't know why that happened the way it did. With ruby 3 and rails 6 i have the initializer as you say.

Docs is still wrong though, but i'll close

Bramjetten commented 2 years ago

Ah yes I should release a new version. The latest version of Spina can be installed without the g :)