添加页面时精炼管理不工作 [英] refinerycms not working when adding page
问题描述
我在尝试使用精炼厂cms从仪表板添加新页面时收到此错误
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 不能为 NULL: INSERT INTO "refinery_page_translations" ("created_at", "custom_slug", "locale", "menu_title", "refinery_page_id", "title,", ""updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)
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 (?, ?, ?, ?, ?, ?, ?, ?)
使用下一个 gemfile
with the next gemfile
gem 'rails', '3.2.14'
gem 'rails', '3.2.14'
组:开发,:测试做宝石'sqlite3'结束
group :development, :test do gem 'sqlite3' end
组:资产做gem 'sass-rails', '~> 3.2.3'gem '咖啡轨','~> 3.2.1'
group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'结束
gem 'uglifier', '>= 1.0.3' end
gem 'jquery-rails','~> 2.3.0'
gem 'jquery-rails','~> 2.3.0'
gem 'refinerycms', '~> 2.1.0'
gem 'refinerycms', '~> 2.1.0'
推荐答案
根据我在 https://github.com/refinery/refinerycms/issues/2450,将此添加到您的 Gemfile:
Based on an answer I found at https://github.com/refinery/refinerycms/issues/2450, add this to your Gemfile:
gem 'globalize3', '0.3.0'
然后运行
bundle install
如果失败,您可能需要按照错误输出的建议进行操作,然后运行
if this fails you may need to do as the error output suggests, and run
bundle update globalize3
您可能需要通过
$ rm db\*.sqlite3
$ rake db:migrate db:seed
这为我解决了问题.
这篇关于添加页面时精炼管理不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!