Closed szabgab closed 2 years ago
I think you need to install the CLI. Checkout the getting started guide: https://docs.amberframework.org/amber/getting-started
I tried to follow the instructions there, but
$ curl -L https://github.com/amberframework/amber/archive/stable.tar.gz | tar xz
$ cd amber-stable
$ shards install
Resolving dependencies
Fetching https://github.com/amberframework/amber-router.git
Fetching https://github.com/crystal-lang/json_mapping.cr.git
Fetching https://github.com/crystal-ameba/ameba.git
Fetching https://github.com/amberframework/cli.git
Unable to satisfy the following requirements:
- `crystal (>= 0.35.0)` required by `amber_router 0.4.4`
- `crystal (>= 0.34.0, < 2.0.0)` required by `json_mapping 0.1.1`
- `crystal (>= 0.35.0)` required by `ameba 0.13.4`
- `crystal (~> 0.30, >= 0.30.0)` required by `cli 0.9.3`
Failed to resolve dependencies, try updating incompatible shards or use --ignore-crystal-version as a workaround if no update is available.
I don't understand why is that after all I have:
$ crystal --version Crystal 1.0.0 [dd40a2442] (2021-03-22)
LLVM: 10.0.0 Default target: x86_64-unknown-linux-gnu
Anyway I went on and installed the dependencies with
shards install --ignore-crystal-version
After that
$ make install Building amber in /home/gabor/work/amber-demo/amber-stable/bin/amber cp: cannot create regular file '/usr/local/bin/amber': Permission denied make: *** [Makefile:28: install] Error 1
I would like to install it in a local directory. As I can see it is hard-code in the Makefile. I guess I could manually edit it, but probably this whole thing should work with just a shard.yml file
to build in your local project, add the amber dependency and the target to your shard.yml
targets:
...
amber:
main: lib/amber/src/amber/cli.cr
dependencies:
...
amber:
github: amberframework/amber
version: 0.36.0
Then run shard build amber
This will build the cli and place it in the bin
directory. From here, you can run bin/amber
instead.
Thanks, that worked.
Description
After installing amber on Crystal 1.0.0 I still don't have the
amber
command to get started.Steps to Reproduce
I have this
shard.yml
file in an otherwise empty directoryI installed the dependencies using
It did not report any errors and I have
lib/amber
and a lot of other things installed in lib. However inbib/
I only have theameba
command notamber
Nor is it found anywhere in my $PATHVersions
Ubuntu 21.04 using Crystal 1.0.0
lib/ameba/shard.yml
saysversion: 0.14.3