質問

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