Gradle app doesn't start - heroku

I'm experimenting with deploying a Gradle app on Heroku. Here is the code: https://github.com/sarbogast/spark-groovy-hello-world/tree/master
When I run 'gradle stage' and the command in Procfile locally, it works. But when I push to Heroku, the app crashes and the log says it can't find the script:
bash: build/install/spark-groovy-hello-world/bin/spark-groovy-hello-world: No such file or directory
I'm still a beginner with Heroku, so I don't understand everything about how it works.

I figured it out: I was missing a settings.gradle file in the root of my project, with the following line in it: rootProject.name = "spark-groovy-hello-world"
Now the app doesn't work yet, because I have a port problem, but that's another issue.

Related

jrebel standalone could not find agent library in macos

i'm running gradle task at project root directory but it erros, looks as below:
$> ./gradlew bootRun
Error occurred during initialization of VM Could not find agent
library /Users/xxx/bin/jrebel/libjrebel64.dylib in absolute path, with
error: dlopen(/Users/xxx/bin/jrebel/libjrebel64.dylib, 1): image not
found
it setup jrebel follow https://manuals.jrebel.com/jrebel/standalone/springboot.html#spring-boot-using-gradle
And, i checked agentpath and is right.
Anyone had same problem?
Isn't there a blank space in your username? I would try to redownload the JRebel again, unzip it into some other folder and then try again.

Calling fastlane with its actions from another directory

I am working on a ruby project that its intention, at the moment, is to automate the deploy process for an iOS project. In the future, android will be considered.
The ruby deploy file will take a JSON url that contains information about the apps intended to release. The Fastlane actions will do the job.
{
"version":1.0,
"build":2,
"git":{
"name":"appName",
"url":"git#gitlab.com:me/myapp.git"
},
"apps":[
{
"bundle_id":"com.myapp1",
"app_name":"App1",
"username":"me#kmail.com",
"password":"1234",
"team_name":"TeamName"
},
{
"bundle_id":"com.App2",
"app_name":"App2",
"username":"me#kmail.com",
"password":"1234",
"team_name":"TeamName"
}
]
}
The initial idea for the project was to have:
The deploy project (Gemfile, files, dependencies ...) with its own git repository.
The Xcode project with its own repository.
A Fastlane project (with all the fastlane files) with its own repository
Correct setup
Xcode and Fastlane projects as submodules of deploy project.
This whole project is intended to be in a CI machine.
NOTE Ask for more info if needed.
Question
The deploy project calls fastlane actions using exec(). Since the fastlane folder now is in
./XcodeProject/fastlane, How can I call the actions? My first approach was:
exec("fastlane ./XcodeProject/MyAction")
but I am wrong...
Any ideas?
Thank you
You may be able to temporarily change your working directory using a shell script, where you enclose your cd and fastlane commands in parentheses, like so:
(cd XcodeProject && fastlane MyAction)
I'm not sure if that will work within your exec(...) call but you could write an external script that does the above, and then run that within an exec call.
See this post for more information.

intelliJ debug not finding file in target folder

Hello I have an appengine module that won't work properly since I change my old appengine plugin to the new google cloud tools.
I have a module that is a child of my project.
I have a maven directive to copy some files from another child modules to the target folder of my module target/artifcat-name/WEB-INF.
The copy works.
But when I debug the appengine module in Intellij, I have a FileNotFoundException while trying to read the copied file from the target dir.
It worked fine before the update.
It also works fine when I run the devserver from the shell (mvn appengine:devserver.
I don't what I should change in Intellij to have it working again.
Ideas?
Thanks.

Deploy WebSharper.Suave web application to Heroku

I can not understand what I need to change to make it.
I created a demo project from this blogpost with app.json and Procfile:
web: fsharpi-heroku WebsahrperSuaveHerokuExample1.sln
Next, I tried to deploy it to Heroku in accordance with these recommendations:
heroku create websahrper-with-suave-example --buildpack https://github.com/SuaveIO/mono-script-buildpack.git
heroku git:remote -a websahrper-with-suave-example
git push heroku master
There was an error in Heroku when building the project:
...
Import process completed.
-----> packages.config found, installing dependencies with nuget
Cannot open assembly 'install': No such file or directory.
! Push rejected, failed to compile SuaveFramework app
Could you suggest me a solution if there is one?
Have you tried here:
https://github.com/SuaveIO/heroku-getting-started
Fork it and click the Deploy to Heroku button.
Don't have the rep to comment on the above, but ademar's solution should cover as well as long as you don't have a file named "app.fsx"
The heroku buildpack checks to see if there is a script, then checks for a solution:
https://github.com/SuaveIO/mono-script-buildpack/blob/master/bin/compile#L66
Just make sure there is a .sln file in the project directory (can be empty, just needs to be present) or fork the buildpack and just make it default run mono $YOURPROJECT in the compile step.
When using an sln instead of a script, you need to change your Procfile to:
web: mono Path/execName.exe

Play framework file hierarchy on Heroku

I'm trying to download a file from my app, when I'm running on localhost everything is fine and in using this path in order to download the file
../myapp/public/files/67784.pdf
But on Heroku I'm getting java.io.FileNotFoundException. How can I find location of the file on Heroku?
Thanks!
Public assets in Play are packaged in the Jar on compilation (makes it very convenient for moving everything around, and get them from a plugin or whatever). So you have to get them from you app Jar.
I think that you can use the Play's resource helper (http://www.playframework.com/documentation/2.2-SNAPSHOT/api/java/play/Application.html), but I haven't tried.
Play.Application.resource("public/filename")
Note that on Heroku, any file modification/addition on the server is lost whenever you redeploy, or restart or add an instance... The only files that persist are the ones in your Git repo.

Resources