asdf-community / asdf-crystal

Crystal plugin for the asdf version manager
https://github.com/asdf-vm/asdf
Apache License 2.0
75 stars 16 forks source link

v0.23.1 install broken on OS X #4

Closed lbighetti closed 7 years ago

lbighetti commented 7 years ago

0.23.1 won't install on OSX - I'm using 0.23.0 as a workaround (this works). See printscreen attached.

I can reproduce, let me know if you need anything else.

image

mgxm commented 7 years ago

Seems the URL has changed For all the other releases: crystal-0.23.0-1-darwin-x86_64.tar.gz Now: crystal-0.23.1-3-darwin-x86_64.tar.gz

mgxm commented 7 years ago

@lbighetti I just pushed to fix_releases_url. From Travis, everything seems right. Can you test, please? before I can merge in master

jeffhertzler commented 7 years ago

The default macOS grep is FreeBSD grep. It doesn't support the -P flag.

lbighetti commented 7 years ago

Hi @marciogm, sorry I only had the time now. Thanks a lot for the PR and also @jeffhertzler.

It however, still doesn't work for me: image

Let me know if I should open a new issue. Thanks!

mgxm commented 7 years ago

@lbighetti curl is trying to resume the download. Try to delete the temp file and install again. rm /var/folders/wl/9........../T/crystal-0.23.1-version.tar.gz

lbighetti commented 7 years ago

@marciogm thanks! you're right. After removing the file i was able to install. I'm getting this now crystal -v

[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0 Crystal 0.23.1 [e2a1389] (2017-07-13) LLVM 3.8.1

have you seen this before, any idea how to fix ?

mgxm commented 7 years ago

@lbighetti 👍 never, but I found it: https://github.com/spyder-ide/spyder/issues/3730 Seems to be an issue with libevent you can try export EVENT_NOKQUEUE=1 and test again :)

lbighetti commented 7 years ago

@marciogm wizard, that worked!

I get correct output now from crystal -v

Crystal 0.23.1 [e2a1389] (2017-07-13) LLVM 3.8.1

Still... I'm getting a issue when trying to run crystal files though. for example, When I try to run the basic http server hello world from Crystal website:

# A very basic HTTP server
require "http/server"

server = HTTP::Server.new(8080) do |context|
  context.response.content_type = "text/plain"
  context.response.print "Hello world, got #{context.request.path}!"
end

puts "Listening on http://127.0.0.1:8080"
server.listen

I get

Error in app.cr:1: while requiring "prelude": can't find file 'prelude' relative to >'/Users/leandro/ws/littlealchemist.io/exploring/crystal'

require "http/server" ^

The path /Users/leandro/ws/littlealchemist.io/exploring/ is the root of the project. It seems like it's expecting a crystal folder with Crystal source code ?

Because this file is here: https://github.com/crystal-lang/crystal/tree/master/src

or perhaps i need an environment variable linking to crystal asdf installation ?

Thanks a lot!

mgxm commented 7 years ago

@lbighetti Yes, you're right! Thank You. 😄 asdf-crystal/commit/a43bb4f0272bf3876b7f9397702b27b9efd84c76 Should work now 👍

mgxm commented 7 years ago

I changed the list-all too, but without luck. It is failing on Travis again, I don't know why

lbighetti commented 7 years ago

Great! Works like a charm now! Thanks a bunch @marciogm ! Really appreciate the help! 🙏

mgxm commented 7 years ago

Good, Glad to know! 😄