安装ghost博客见面`npm WARN无法在wd ghost`中运行

时间:2016-10-19 05:21:17

标签: ghost-blog

当我下载ghost并将其解压缩到new_ghost时,我遇到了这个错误

ActiveRecord::StatementInvalid: PG::InvalidSchemaName: ERROR:  no schema has been selected to create in
: CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 

PG::InvalidSchemaName: ERROR:  no schema has been selected to create in

Tasks: TOP => db:migrate
(See full trace by running
ActiveRecord::StatementInvalid: PG::InvalidSchemaName: ERROR:  no schema has been selected to create in
: CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 

PG::InvalidSchemaName: ERROR:  no schema has been selected to create in

Tasks: TOP => db:migrate
(See full trace by running task with --trace) task with --trace)

2 个答案:

答案 0 :(得分:1)

如果查看package.json,您将看到预安装脚本。它正在寻找节点。如果您正在使用Ubuntu,则可能需要将其更改为nodejs。另一件要尝试的是:

npm cache clean
rm -rf node_modules
npm install --production
npm start --production

另一种可能性是,如果您使用的是不支持的节点版本。在这种情况下,您可以禁用版本检查:

GHOST_NODE_VERSION_CHECK=false npm install --production
GHOST_NODE_VERSION_CHECK=false npm start --production

答案 1 :(得分:0)

我遇到了同样的问题 正如Ghost人员http://support.ghost.org/troubleshooting/#npm-start-issues所述,您应该启用或增加交换大小。

如果您未启用交换,则可以按照此处的指南进行操作:https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04