SpinaCMS / Spina

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

rails g spina:install not work, has exception #64

Closed seaify closed 8 years ago

seaify commented 9 years ago

@whomwah @parndt throw a exception at this line

Spina::Account.first.save
-- create_table("spina_users", {:force=>:cascade})
   -> 0.0020s
== 20150719080928 CreateSpinaTables: migrated (0.0507s) =======================

      create  app/views/layouts/default/application.html.erb
      create  app/views/default/pages/homepage.html.erb
      create  app/views/default/pages/show.html.erb
What would you like to name your website? seaify
Please enter an email address for your first user: dilin.life@gmail.com
Create a temporary password: xxxx
        rake  spina:bootstrap
rake aborted!
NoMethodError: undefined method `save' for nil:NilClass
/Users/chuck/.rvm/gems/ruby-2.1.5/gems/spina-0.6.29/lib/tasks/spina_tasks.rake:5:in `block (2 levels) in <top (required)>'
/Users/chuck/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/Users/chuck/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => spina:bootstrap
(See full trace by running task with --trace)
       route  mount Spina::Engine => '/'
seaify commented 9 years ago

when i run rails g spina:install second time, it works. but the /admin path throw a exception

image

seaify commented 9 years ago

when i run second time, it actually add "mount Spina::Engine => '/'" two time, after i remove it. it works.

@whomwah @parndt but the real problem is that the first install, actually, Spina::Account.first is nil, it means that before this rake file, there is no account being setup, although you collect the email & temporary password.