Actions on Google - Mac gactions won't run

久未见 提交于 2019-12-10 23:15:50

问题


I am trying to set up the Actions sdk as described here:

https://developers.google.com/actions/sdk

I downloaded gactions for a Mac 64-bit machine. If I try to open the file, it opens as text. When I am in the folder containing gactions, I try to run gactions init and get the response:

-bash: gactions: command not found

Any thoughts?


回答1:


Try this:

  • Download Google gactions cli from gaction CLI
  • On Mac and Linux, to make the binary executable run from terminal: $ cd folder_with_gactions $ chmod +x gactions
  • Execute gactions $ cd folder_with_gactions $ ./gactions init

Also, you may find this tutorial interesting if you are trying to create an action in Google Home : How to create a custom private Google Home Action with API.AI and Google App Engine. In STEP 8 you can find an example of gactions.




回答2:


If you have already setup google-cloud-sdk correctly, then you can drop the gactions file into the google-cloud-sdk/bin folder. Alternatively, you can add a path to bash directly to the folder you have gactions.




回答3:


Download gactions

copy downloaded gactions and put into a local Project folder

and then go to your project directory cd "project directory"

run following commands :

$ chmod +x gactions

$ ./gactions init

it will create action.json into your folder




回答4:


  • Ensure you run chmod +x gactions to make the binary executable
  • Copy the binary executable into the project directory
  • Run ./gactions init from the terminal/command line



回答5:


To add the gactions command CLI location to the System Paths:

  1. Use “Go to the Folder” option of Finder, to search “~/.bash_profile”

  2. Open the File “~/.bash_profile”
 in edit mode and add the following command, at the top the file, Save and Close.


    export PATH="$PATH:$HOME/gactionsCLI"

    Note: Above path refers to the folder which contains the executable file “Unix Executable”

  3. Restart the Terminal and try the commands



来源:https://stackoverflow.com/questions/42452523/actions-on-google-mac-gactions-wont-run

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!