Raku / App-Rakubrew

Raku environment manager
https://rakubrew.org/
Other
26 stars 13 forks source link

Rakubrew switch does not work? #59

Closed melezhik closed 1 year ago

melezhik commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

melezhik commented 1 year ago

👍