bio-miga / miga

MiGA: Microbial Genomes Atlas
Artistic License 2.0
31 stars 9 forks source link

ruby: not found #168

Open gwL955 opened 1 year ago

gwL955 commented 1 year ago

When miga is miga init, it always reports ruby not found The same is true on a brand new server

I think this is a permanent mistake

/home/gewenlong11/basic/miniconda3/envs/miga/share/rubygems/bin/miga: 6: exec: /home/gewenlong11/basic/miniconda3/envs/miga/share/rubygems/bin/ruby: not found
gwL955 commented 1 year ago

It's actually in the following position

which ruby
/home/gewenlong11/basic/miniconda3/envs/miga/bin/ruby

I tried to directly modify the sixth line to specify the position that could be passed

#exec "$bindir/ruby" "-x" "$0" "$@"
exec "/home/gewenlong11/basic/miniconda3/envs/miga/bin/ruby" "-x" "$0" "$@"
jianshu93 commented 1 year ago

Hello all,

I believe we have exactly the same problem when trying install miga in a conda environment last time, after version 1.3.1 or so @FangYuan0059 @lmrodriguezr

Jianshu

lmrodriguezr commented 1 year ago

Hello @gewenlong365

Thanks for the report!

I believe this is not a bug in MiGA but a bug in the Ruby recipe in conda-forge (https://github.com/conda-forge/ruby-feedstock/issues/116).

I'll try to resolve the issue directly in conda-forge, but a more stable workaround in the meantime is to symlink Ruby in the rubygems folder (instead of editing the executable):

mkdir -p "$GEM_HOME/bin"
ln -s "$CONDA_PREFIX/bin/ruby" "$GEM_HOME/bin/ruby"
lmrodriguezr commented 1 year ago

A pull request was created in conda-forge which should solve this issue: https://github.com/conda-forge/ruby-feedstock/pull/122

lmrodriguezr commented 8 months ago

A workaround exists, and the solution doesn't depend on MiGA. Bumping to 1.5