Actions on Google - Mac gactions won't run

2019-07-17 19:58发布

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?

5条回答
Luminary・发光体
2楼-- · 2019-07-17 20:13

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

查看更多
forever°为你锁心
3楼-- · 2019-07-17 20:14

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

查看更多
Viruses.
4楼-- · 2019-07-17 20:20
  • 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楼-- · 2019-07-17 20:28

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.

查看更多
萌系小妹纸
6楼-- · 2019-07-17 20:30

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.

查看更多
登录 后发表回答