SpontaneousCMS / spontaneous

Spontaneous is a next-generation Ruby CMS
http://spontaneous.io
MIT License
78 stars 14 forks source link

Not very friendly README #43

Open drakmail opened 10 years ago

drakmail commented 10 years ago

How I can create several pages? I'm added new child of Page class, define fields (:name for example) and... in back nothing changes. But schema is changed. When I tried to add this gist to file schema/simple.rb I has error:

01:38:54 back.1  | NoMethodError - undefined method `ui_class' for nil:NilClass:
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/model/box/allowed_types.rb:96:in `export'
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/prototypes/box_prototype.rb:190:in `block in export'
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/prototypes/box_prototype.rb:190:in `each'
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/prototypes/box_prototype.rb:190:in `flat_map'
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/prototypes/box_prototype.rb:190:in `export'
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/model/core/serialisation.rb:17:in `block in export'
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/model/core/serialisation.rb:17:in `map'
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/model/core/serialisation.rb:17:in `export'
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/model/page.rb:40:in `export'
01:38:54 back.1  |  /Users/drakmail/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spontaneous-0.2.0.beta5/lib/spontaneous/schema.rb:262:in `block in export'

I'm very like idea of spontaneous, but it is very unusable for me now. Please, help! :disappointed_relieved:

magnetised commented 10 years ago

Sorry about the state of the documentation, it's a huge problem (in lots of ways).

I don't know what else you had in your schema but the contents of the gist you link to work perfectly for me here, so it must be something else you've included.

Could you share a gist of your (complete) schema with me. That'll help identify the problem.

magnetised commented 10 years ago

I've looked at this again and I was wrong, there is a problem with the current released gem and that gist (that I wasn't reproducing due to a weird local rvm environment).

I've just released a new beta version, beta6, that should work for you.

You can upgrade your current site by altering the Gemfile to read

gem 'spontaneous', '~> 0.2.0.beta6'

Then run bundle update spontaneous

You'll then need to run some pending migrations:

spot migrate

and try your site again:

spot s

OR you could just start from scratch, whichever seems easiest.

Let me know how you get on.