slagyr / gaeshi

Google App Engine library for Clojure
MIT License
38 stars 4 forks source link

Unable to deploy on MacOS (path issue to app engine dir) #12

Closed jconti closed 11 years ago

jconti commented 11 years ago

I am using appengine release: "1.7.4", MacOS Mountain Lion. Setting the :appengine-sdk-dir "/usr/local/google_appengine" I get the following:

Gaeshi: Invoking deploy command
java.io.IOException: Cannot run program "/usr/local/google_appengine/bin/appcfg.sh": error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:466)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
    at joodo.cmd$exec.invoke(cmd.clj:21)
    at gaeshi.kuzushi.commands.deploy$deploy.invoke(deploy.clj:59)
    at gaeshi.kuzushi.commands.deploy$execute.invoke(deploy.clj:66)
    at clojure.lang.Var.invoke(Var.java:415)
    at joodo.kuzushi.core$run_command.invoke(core.clj:46)
    at joodo.kuzushi.core$run.doInvoke(core.clj:53)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:601)
    at gaeshi.kuzushi.main$run_with_bindings.invoke(main.clj:10)
    at gaeshi.kuzushi.main$run_with_args.doInvoke(main.clj:20)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:601)
    at leiningen.gaeshi$gaeshi.doInvoke(gaeshi.clj:6)
    at clojure.lang.RestFn.invoke(RestFn.java:423)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:603)
    at leiningen.core.main$resolve_task$fn__836.doInvoke(main.clj:123)
    at clojure.lang.RestFn.applyTo(RestFn.java:139)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:603)
    at leiningen.core.main$apply_task.invoke(main.clj:146)
    at leiningen.core.main$_main$fn__895.invoke(main.clj:223)
    at leiningen.core.main$_main.doInvoke(main.clj:208)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:601)
    at clojure.main$main_opt.invoke(main.clj:324)
    at clojure.main$main.doInvoke(main.clj:427)
    at clojure.lang.RestFn.invoke(RestFn.java:457)
    at clojure.lang.Var.invoke(Var.java:427)
    at clojure.lang.AFn.applyToHelper(AFn.java:172)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
Caused by: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
    at java.lang.ProcessImpl.start(ProcessImpl.java:91)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
    ... 46 more

I don't see the sh file anymore, can I create it?

Electra:hello johnconti$ ls /usr/local/google_appengine
BUGS            VERSION         bulkloader.py       endpointscfg.py     lib
LICENSE         api_server.py       demos           gen_protorpc.py     new_project_template
README          appcfg.py       dev_appserver.py    google          remote_api_shell.py
RELEASE_NOTES       bulkload_client.py  download_appstats.py    google_sql.py       tools
slagyr commented 11 years ago

I have the 1.7.0 version of the appengine SDK and it has appcfg.sh. Is it removed from newer versions?

Workaround:

gaeshi prepare

Then use whatever the new command is to deploy the war directory. Assuming the deployment structure is the same.

Micah

On Jan 15, 2013, at 7:57 PM, John Conti notifications@github.com wrote:

I am using appengine release: "1.7.4", MacOS Mountain Lion. Setting the :appengine-sdk-dir "/usr/local/google_appengine" I get the following:

Gaeshi: Invoking deploy command java.io.IOException: Cannot run program "/usr/local/google_appengine/bin/appcfg.sh": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at java.lang.Runtime.exec(Runtime.java:593) at java.lang.Runtime.exec(Runtime.java:466) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) at joodo.cmd$exec.invoke(cmd.clj:21) at gaeshi.kuzushi.commands.deploy$deploy.invoke(deploy.clj:59) at gaeshi.kuzushi.commands.deploy$execute.invoke(deploy.clj:66) at clojure.lang.Var.invoke(Var.java:415) at joodo.kuzushi.core$run_command.invoke(core.clj:46) at joodo.kuzushi.core$run.doInvoke(core.clj:53) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:601) at gaeshi.kuzushi.main$run_with_bindings.invoke(main.clj:10) at gaeshi.kuzushi.main$run_with_args.doInvoke(main.clj:20) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:601) at leiningen.gaeshi$gaeshi.doInvoke(gaeshi.clj:6) at clojure.lang.RestFn.invoke(RestFn.java:423) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:532) at clojure.core$apply.invoke(core.clj:603) at leiningen.core.main$resolve_task$fn836.doInvoke(main.clj:123) at clojure.lang.RestFn.applyTo(RestFn.java:139) at clojure.lang.AFunction$1.doInvoke(AFunction.java:29) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:603) at leiningen.core.main$apply_task.invoke(main.clj:146) at leiningen.core.main$_main$fn895.invoke(main.clj:223) at leiningen.core.main$_main.doInvoke(main.clj:208) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:532) at clojure.core$apply.invoke(core.clj:601) at clojure.main$main_opt.invoke(main.clj:324) at clojure.main$main.doInvoke(main.clj:427) at clojure.lang.RestFn.invoke(RestFn.java:457) at clojure.lang.Var.invoke(Var.java:427) at clojure.lang.AFn.applyToHelper(AFn.java:172) at clojure.lang.Var.applyTo(Var.java:532) at clojure.main.main(main.java:37) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:53) at java.lang.ProcessImpl.start(ProcessImpl.java:91) at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) ... 46 more I don't see the sh file anymore, can I create it?

Electra:hello johnconti$ ls /usr/local/google_appengine BUGS VERSION bulkloader.py endpointscfg.py lib LICENSE api_server.py demos gen_protorpc.py new_project_template README appcfg.py dev_appserver.py google remote_api_shell.py RELEASE_NOTES bulkload_client.py download_appstats.py google_sql.py tools — Reply to this email directly or view it on GitHub.

jconti commented 11 years ago

Only appcfg.py. I assume the .sh file was just a wrapper, so maybe this is no big deal. Thanks for the work around. I will give it a try.

,John

jconti commented 11 years ago

It appears that there have been some changes:

Electra:hello johnconti$ /usr/local/google_appengine/appcfg.py update war
08:37 PM Host: appengine.google.com
Usage: appcfg.py [options] update <directory>

appcfg.py: error: Directory does not contain an app.yaml configuration file.
Electra:hello johnconti$ ls
WEB-INF     project.clj spec        target
config      public      src     war
Electra:hello johnconti$
jconti commented 11 years ago

Hmm, I just downloaded, installed and tried 1.7.0, but get the same error. I did a find to make sure, but there is no appcfg.sh.

slagyr commented 11 years ago

Are you downloading the Java SDK?

Sent from my iPhone

On Jan 15, 2013, at 11:04 PM, John Conti notifications@github.com wrote:

Hmm, I just downloaded, installed and tried 1.7.0, but get the same error. I did a find to make sure, but there is no appcfg.sh.

— Reply to this email directly or view it on GitHub.

jconti commented 11 years ago

Sorry, I should have made a better bug report. My java is the one that comes with Apple Dev kit. It reports itself as:

Electra:hello johnconti$ javac -version
javac 1.6.0_37
Electra:hello johnconti$ 

To install 1.7.0 I :

  1. downloaded it from google,
  2. removed the app package from the previous version,
  3. put the new version in Applications and
  4. ran the menu command to update the /usr/local/ symlinks.

Did I need to do lein deps?

slagyr commented 11 years ago

John,

My mistake… I meant the Google AppEngine Java SDK. GAE comes in two flavors, Python and Java. It would make sense to me that the Python SDK comes with different executable and is not comparable with a java project. Based on your notes, I'm getting the impression that maybe you're using the Python SDK.

Link to download Java SDK: http://googleappengine.googlecode.com/files/appengine-java-sdk-1.7.4.zip

Micah

On Jan 16, 2013, at 9:20 AM, John Conti notifications@github.com wrote:

Sorry, I should have made a better bug report. My java is the one that comes with Apple Dev kit. It reports itself as:

Electra:hello johnconti$ javac -version javac 1.6.0_37 Electra:hello johnconti$ To install 1.7.0 I :

  1. downloaded it from google,
  2. removed the app package from the previous version,
  3. put the new version in Applications and
  4. ran the menu command to update the /usr/local/ symlinks.

Did I need to do lein deps?

— Reply to this email directly or view it on GitHub.

jconti commented 11 years ago

Micah,

Thank you! The application package does not contain the java sdk as you say. When I downloaded the correct thing (er um, like the instructions said) it works great.

Thanks again for all the help.

,John