Amber: --recipe flag doesn't work

Created on 26 Jun 2018  Â·  9Comments  Â·  Source: amberframework/amber

Description

Ref: https://github.com/amberframework/recipes/issues/32

Steps to Reproduce

  1. amber new app -r default

Expected behavior: Create an app based on default recipe (or any recipe)

Actual behavior: Get an error output:

➜  ~ amber new blog -r default
12:11:40 Generate   | (INFO) Rendering App blog in ./blog from default
12:11:41 Generate   | (ERROR) Could not find the recipe default : 302 Found
Environment file not found for ./config/environments/production

Reproduces how often: 100%

Versions

Amber v0.8.0

Additional Information

Looks like this is issue is due crystal HTTP::Client doesn't support redirects yet, see: https://github.com/crystal-lang/crystal/issues/2721

/cc @damianham

bug crystal-issue Important help-wanted

Most helpful comment

I think we need to move to shards based install asap.

All 9 comments

I think we need to move to shards based install asap.

I think we need to move to shards based install asap.

@damianham Yeah, please! amberframework/recipes is already a nightmare to maintain :sweat: Should we archive it?

I'm working in a Vue.js recipe, see: https://github.com/faustinoaq/vue-amber-recipe (not published yet)

I think is better to use recipes like this:

amber new myapp --recipe https://codeload.github.com/faustinoaq/vue-amber-recipe/zip/0.0.1

Just like heroku buildpacks, WDYT?

After looking into this it seems that it could be a while before it’s fixed in the Crystal library. Is it worth putting a work-around in for now. E.g. if a 302 response is found send a second request to the redirect location?

I realise this isn’t an efficient solution, but since this command is only ran during development (and only once per project at that) I don’t feel it would be too much of an issue.

If this is an ok solution I can create a fix for this and do a pull request 🙂

@acoustep I think that's whats going to end up in stdlib anyway, at some point, so that sounds good to me.

I think we can just re-open this PR and merge. https://github.com/amberframework/amber/pull/900

@acoustep Will this fix the issue?

@drujensen yes, that looks about the same as how I would have done it

I am now out of contract so I will have some time to create a PR to install from shards

@acoustep I merged #900 to master. Let me know if this fixes the issue.

@drujensen Can confirm it's working 🙂 (This is @acoustep - wrong account!)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eliasjpr picture eliasjpr  Â·  6Comments

aarongodin picture aarongodin  Â·  7Comments

sumwatt picture sumwatt  Â·  4Comments

faustinoaq picture faustinoaq  Â·  5Comments

nicbet picture nicbet  Â·  7Comments