refinerycms not working when adding page

我的未来我决定 提交于 2019-12-06 09:17:42

问题


I'm getting this error when trying to add a new page from the dashboard with refinerycms

SQLite3::ConstraintException: refinery_page_translations.refinery_page_id may not be NULL: INSERT INTO "refinery_page_translations" ("created_at", "custom_slug", "locale", "menu_title", "refinery_page_id", "slug", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)

with the next gemfile

gem 'rails', '3.2.14'

group :development, :test do gem 'sqlite3' end

group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1'

gem 'uglifier', '>= 1.0.3' end

gem 'jquery-rails','~> 2.3.0'

gem 'refinerycms', '~> 2.1.0'


回答1:


Based on an answer I found at https://github.com/refinery/refinerycms/issues/2450, add this to your Gemfile:

gem 'globalize3', '0.3.0'

and run

bundle install

if this fails you may need to do as the error output suggests, and run

bundle update globalize3

You may need to delete and recreate your databases via

$ rm db\*.sqlite3
$ rake db:migrate db:seed

This fixed the problem for me.



来源:https://stackoverflow.com/questions/19691040/refinerycms-not-working-when-adding-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!