首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >按照Sharetribe的安装说明,得到错误“error1064 (42000):您的SQL语法中有一个错误;”

按照Sharetribe的安装说明,得到错误“error1064 (42000):您的SQL语法中有一个错误;”
EN

Stack Overflow用户
提问于 2014-08-21 15:10:37
回答 2查看 445关注 0票数 0

我完全是Ruby的一员,但我按照下面的说明做到了这一点:https://github.com/sharetribe/sharetribe

但是,将此代码直接复制/粘贴到终端中会导致错误。有什么想法吗?

代码语言:javascript
复制
c = Community.create(:name => "your_chosen_name_here", :domain => "your_chosen_subdomain_here")

tt = c.transaction_types.create(:type => "Sell",
 :price_field => 1,
 :price_quantity_placeholder => nil);

tt_trans = TransactionTypeTranslation.create(:transaction_type_id => tt.id,
 :locale => "en",
 :name => "Sell",
 :action_button_label => "Buy");
ca = c.categories.create;
ca_trans = CategoryTranslation.create(:category_id => ca.id,
 :locale => "en",
  :name => "Items");
CategoryTransactionType.create(:category_id => ca.id, :transaction_type_id => tt.id)

错误包括:

代码语言:javascript
复制
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'c = Community.create(:name => "marketfarm", :domain => "marketfarm")
c = Communi' at line 1

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tt_trans = TransactionTypeTranslation.create(:transaction_type_id => tt.id,
 :lo' at line 1

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ca = c.categories.create' at line 1

等。

EN

回答 2

Stack Overflow用户

发布于 2015-02-23 16:18:24

感谢您试用Sharetribe!

首先,我们已经更新了安装说明。新的安装说明不需要执行此步骤。

在您的情况下,我猜那里有某种复制/粘贴错误。也许你可以先尝试将命令复制/粘贴到文本编辑器(即记事本)中,然后删除换行符并将命令设置为单行。我注意到有时候console不能理解多行粘贴命令。

票数 0
EN

Stack Overflow用户

发布于 2016-04-21 15:17:21

我猜您使用的是除Mysql之外的任何其他数据库,如sqlite或postgresql。Sharetribe仅支持Mysql数据库。

谢谢

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25420277

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档