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

Rakubrew switch does not work? #59

Closed
melezhik opened this issue Nov 8, 2022 · 4 comments
Closed

Rakubrew switch does not work? #59

melezhik opened this issue Nov 8, 2022 · 4 comments
Assignees

Comments

@melezhik
Copy link

melezhik commented Nov 8, 2022

Hi I am trying to use rakubrew in Sparrow, I use rakubrew low level installation mode (following documentation) and then raku brew download moar-$version && rakubrew switch $version however I do see that old (system) raku still in use :

[task run: task.bash - tasks/main]
[dump code: task.bash]
[1] set -e
[2] 
[3] version=$(config version)
[4] echo "Use rakudo version: $version"
[5] rakubrew download moar-$version
[6] rakubrew switch moar-$version
[7] 
[8] cd source
[9] which zef
[10] which raku
[11] raku --version
[12] zef --version
[13] 
[14] zef update 
[15] zef install --/test .
[16] 
[task stdout]
16:25:56 :: Use rakudo version: 2022.07
16:25:57 :: Downloading https://rakudo.org/dl/rakudo/rakudo-moar-2022.07-01-linux-x86_64-gcc.tar.gz
16:25:58 :: Extracting
16:26:00 :: Updating shims
16:26:00 :: Switching to moar-2022.07
16:26:00 :: Done, moar-2022.07 installed
16:26:00 :: Switching to moar-2022.07
16:26:00 :: /home/worker/.raku/bin/zef
16:26:00 :: /opt/rakudo-pkg/bin/raku
16:26:00 :: Welcome to Rakudo™ v2022.07.
16:26:00 :: Implementing the Raku® Programming Language v6.d.
16:26:00 :: Built on MoarVM version 2022.07.
16:26:01 :: v0.14.4

The full log could be found here - https://ci.sparrowhub.io/report/1620

@melezhik
Copy link
Author

melezhik commented Nov 8, 2022

I use manual method of rakubrew installation:

[task run: task.bash - tasks/rakubrew-install]
[dump code: task.bash]
[1] set -e
[2] curl -sf https://rakubrew.org/perl/rakubrew -o rakubrew
[3] sudo mv rakubrew /usr/local/bin
[4] sudo chmod a+x /usr/local/bin/rakubrew
[5] rakubrew mode shim
[6] 
[task stdout]
16:25:52 :: Updating shims

@patrickbkr
Copy link
Member

Thanks for the report! That's an error in the documentation. To use Rakubrew in shim mode without the shell hook, one still needs to manually add the path where rakubrew generates the shims to PATH. Something like export PATH=$(rakubrew home)/shims:$PATH should do the trick. I'll see if I can fix the documentation to state this in the next days.

Irrespective of this issue: As I already wrote over here, I generally don't recommend using rakubrew in automation.

@patrickbkr
Copy link
Member

I expanded the documentation on rakubrew.org a bit. So I think this bug can be closed. Thanks for the report!

@melezhik
Copy link
Author

👍

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