Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to deploy app with dash in name (.cr does not exist) #33

Open
cloewen8 opened this issue Aug 7, 2018 · 6 comments
Open

Unable to deploy app with dash in name (.cr does not exist) #33

cloewen8 opened this issue Aug 7, 2018 · 6 comments

Comments

@cloewen8
Copy link

cloewen8 commented Aug 7, 2018

I'm having trouble getting my app to compile for Heroku. I can compile it just fine on my own machine. I am getting an error message, but I'm not sure what it means or how to go about troubleshooting it: .cr does not exist. Any idea what this means and how to resolve it?

I created the project using crystal init, added a Procfile (web: crystal src/cj-fan-server), adjusted the license and version, and created a lib folder. I have not made any other changes to the configuration (not including source code) or structure (source: https://github.com/cloewen8/CJ-Fan-Server).

So far I've tried adding .cr to the process command, renaming the Procfile temporarily, and searching for the error message (not a single match).

@bcardiff
Copy link
Member

bcardiff commented Aug 7, 2018

I would try removing the procfile.

But most important, share the logs of the $ git push heroku master

@cloewen8
Copy link
Author

cloewen8 commented Aug 7, 2018

Removing the Procfile entirely did not make a difference. Here is the entire log:

c:\Users\Colton\Documents\GitHub\CJ-Fan-Server-2>git push heroku master
Counting objects: 47, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (34/34), done.
Writing objects: 100% (47/47), 6.46 KiB | 551.00 KiB/s, done.
Total 47 (delta 8), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Crystal app detected
remote: -----> Installing Crystal (0.25.1 due to latest release at https://github.com/crystal-lang/crystal) from https://github.com/crystal-lang/crystal/releases/download/0.25.1/crystal-0.25.1-1-linux-x86_64.tar.gz... done
remote: -----> Installing Dependencies... done
remote: .cr does not exist
remote:  !     Push rejected, failed to compile Crystal app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to cj-fan-server.
remote:
To https://git.heroku.com/cj-fan-server.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/cj-fan-server.git'

@cloewen8
Copy link
Author

I did some testing with the shell script, and found a solution (on my end). It works if I surround the name, in shard.yml, in double quotes (name: "cj-fan-server").

I don't have much experience with shell scripts, so I'm not sure why this is happening, but I found that anything after ${shard_name} was being placed at the beginning of the line (overwriting characters). Example: Main: ${shard_name}.cr => .crin: cj-fan-server

@bcardiff
Copy link
Member

@cloewen8 could you paste the content of your shard.yml? I guess it is probably missing the top level name: key.

if the code has name: foo in shard.yml, the file to be compiled is ./src/foo.cr.

@cloewen8
Copy link
Author

name: "cj-fan-server"
version: 0.1.0

authors:
  - cj <[email protected]>

dependencies:
  discordcr:
    github: meew0/discordcr

@bcardiff
Copy link
Member

Cool, my last comment was sent without noticing discovery. So it's definitely an issue with shards with names with dashes.

Thanks for narrowing it down and offer a workaround.

@bcardiff bcardiff changed the title .cr does not exist Unable to deploy app with dash in name (.cr does not exist) Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants