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

Error when following "Start a new project" guide #147

Closed
dclausen opened this issue Jan 5, 2018 · 8 comments · Fixed by crystal-lang/crystal#5543
Closed

Error when following "Start a new project" guide #147

dclausen opened this issue Jan 5, 2018 · 8 comments · Fixed by crystal-lang/crystal#5543
Labels

Comments

@dclausen
Copy link

dclausen commented Jan 5, 2018

Trying to follow the "Start a new project" guide located here:
https://luckyframework.org/guides/installing/

and getting an error:

in lib/lucky/src/lucky/action.cr:1: while requiring "./*": can't specify arguments in both, command and args without including "${@}" into your command

Here's a gist showing the backtrace:
https://gist.github.com/dclausen/e2bba86f38b1d881da17ea74f5a94862

@paulcsmith
Copy link
Member

@dclausen Thanks for reporting the issue. Can you also post what OS and version you are on? Did you install through Homebrew or with git/crystal build instructions?

@dclausen
Copy link
Author

dclausen commented Jan 5, 2018

MacOS High Sierra. I installed via Homebrew:

brew tap luckyframework/homebrew-lucky
brew install lucky

@paulcsmith
Copy link
Member

paulcsmith commented Jan 5, 2018

@dclausen I just tried uninstalling and reinstalling Crystal and Lucky and it seemed to work. Just to rule out any weirdness during install can you try:

  • brew uninstall --force lucky crystal-lang
  • brew install lucky crystal-lang

Also what shell are you using?

UPDATE:

This is the line that causes the error: https://github.com/crystal-lang/crystal/blob/3d7320d8c06348a5cd805a3fa42d4bfe5e4cb109/src/process.cr#L321 but I'm not sure why no error is thrown for anyone else. I'll keep digging

@dclausen
Copy link
Author

dclausen commented Jan 5, 2018

I'm using zsh.

I tried following your commands:

➜  my_blog git:(master) ✗ brew uninstall --force lucky crystal-lang
Uninstalling lucky... (3 files, 342.9KB)
Uninstalling crystal-lang... (1,616 files, 105.8MB)
➜  my_blog git:(master) ✗ brew install lucky crystal-lang
==> Installing lucky from luckyframework/lucky
==> Installing dependencies for luckyframework/lucky/lucky: crystal-lang
==> Installing luckyframework/lucky/lucky dependency: crystal-lang
==> Downloading https://homebrew.bintray.com/bottles/crystal-lang-0.24.1_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring crystal-lang-0.24.1_1.high_sierra.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/crystal-lang/0.24.1_1: 827 files, 47MB
==> Installing luckyframework/lucky/lucky
==> Downloading https://github.com/luckyframework/homebrew-lucky/raw/master/built_binaries/lucky-0.8.3
Already downloaded: /Users/davidclausen 1/Library/Caches/Homebrew/lucky-0.8.3.3
==> mv lucky-0.8.3 lucky
🍺  /usr/local/Cellar/lucky/0.8.3: 3 files, 342.8KB, built in 3 seconds
➜  my_blog git:(master) ✗ lucky -v
Error in tasks.cr:2: while requiring "./src/app"

require "./src/app"
^

in src/app.cr:1: while requiring "./dependencies"

require "./dependencies"
^

in src/dependencies.cr:2: while requiring "lucky"

require "lucky"
^

in lib/lucky/src/lucky.cr:7: while requiring "./lucky/*"

require "./lucky/*"
^

in lib/lucky/src/lucky/action.cr:1: while requiring "./*": can't specify arguments in both, command and args without including "${@}" into your command

require "./*"
^
➜  my_blog git:(master) ✗ which lucky
/usr/local/bin/lucky
➜  my_blog git:(master) ✗ ls -al /usr/local/bin/lucky
lrwxr-xr-x  1 dave  admin  31 Jan  5 14:48 /usr/local/bin/lucky -> ../Cellar/lucky/0.8.3/bin/lucky
➜  my_blog git:(master) ✗
➜  my_blog git:(master) ✗ cd ..
➜  crystal lucky -v
0.8.3

@paulcsmith paulcsmith added the bug label Jan 5, 2018
@paulcsmith
Copy link
Member

Start a discussion here in case you're curious about it: https://gitter.im/crystal-lang/crystal?at=5a4fd81b5355812e5757d6a0

@paulcsmith
Copy link
Member

@dclausen Ok this appears to be an issue in Crystal with regards to spaces in the path. I'm guessing you are creating the project where there is a space somewhere in the path. The solution in the meantime is to create the project in a directory without any spaces e.g. ~/Desktop/code or something. LMK if that works

I'll be sure to close this once the issue is fixed in Crystal :)

@dclausen
Copy link
Author

dclausen commented Jan 5, 2018

My home directory actually had the space in it (not by choice) from having restored from a backup. I've confirmed that removing the space fixed the issue. Sorry for the headache and thanks for the quick help!

@paulcsmith
Copy link
Member

Should be fixed by crystal-lang/crystal#5543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants