Closed rubydesign closed 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
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
Ah yes I should release a new version. The latest version of Spina can be installed without the g :)
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 ag
after rails