Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 遵循Sharetribe安装说明并获取错误“error 1064(42000):您的SQL语法有错误_Mysql_Ruby_Macos_Terminal - Fatal编程技术网

Mysql 遵循Sharetribe安装说明并获取错误“error 1064(42000):您的SQL语法有错误

Mysql 遵循Sharetribe安装说明并获取错误“error 1064(42000):您的SQL语法有错误,mysql,ruby,macos,terminal,Mysql,Ruby,Macos,Terminal,我是Ruby的忠实粉丝,但我还是按照以下说明做到了这一点: 但直接将此代码复制/粘贴到终端会导致错误。有什么想法吗 c = Community.create(:name => "your_chosen_name_here", :domain => "your_chosen_subdomain_here") tt = c.transaction_types.create(:type => "Sell", :price_field => 1, :price_quant

我是Ruby的忠实粉丝,但我还是按照以下说明做到了这一点:

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

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)
错误包括:

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

等等。

谢谢您试用Sharetribe

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


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

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

谢谢