https://github.com/catarse/catarse
为什么Devise重定向而不是将用户添加到数据库?在本地机器上一切都很好:
App 18981 stdout: Started POST "/en/sign_up" for ... at 2015-07-28 05:08:34 -0400
App 18981 stdout: Processing by Devise::RegistrationsController#create as HTML
App 18981 stdout: Parameters: {"utf8"=>"✓", "authenticity_token"=>"Ti/CgGvzauy/neVnvPtc+aBEc5NGKRD0SVPqYLL6+J8=", "user"=>{"email"=>"test678777@gmail.com", "show_password"=>"[FILTERED]", "password"=>"[FILTERED]", "newsletter"=>"0"}, "commit"=>"Sign me up", "locale"=>"en"}
App 18981 stdout: Redirected to ...homepage...
App 18981 stdout: Completed 302 Found in 139ms (ActiveRecord: 14.3ms)
App 18981 stdout: Started GET "/en" for ... at 2015-07-28 05:08:34 -0400
在生产环境中创建操作。在控制台中工作正常。
2.2.2 :056 > User.create(email: "1231222232212312@mail.ru", password: "password")
(0.3ms) BEGIN
User Exists (0.5ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = '1231222232212312@mail.ru' LIMIT 1
SQL (4.5ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-07-29 03:09:25.623040"], ["email", "1231222232212312@mail.ru"], ["encrypted_password", "$2a$10$h60hw3at5glyZMtFRt6UiuPEhaUOWa8dNzqU.8fK91XTKNavHWZA2"], ["updated_at", "2015-07-29 03:09:25.623040"]]
SQL (0.6ms) INSERT INTO "user_notifications" ("created_at", "from_email", "from_name", "locale", "template_name", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2015-07-29 03:09:25.630950"], ["from_email", "test@gmail.com"], ["from_name", "Fundinar"], ["locale", "en"], ["template_name", "new_user_registration"], ["updated_at", "2015-07-29 03:09:25.630950"], ["user_id", 9]]
(0.6ms) COMMIT
答案 0 :(得分:0)
需要使用catarse.me
表格中的settings
替换所有值。它有所帮助。