문제

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'

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top