ruby-packer icon indicating copy to clipboard operation
ruby-packer copied to clipboard

Following installation steps, "Could not find rake-13.0.1"

Open beechnut opened this issue 3 years ago • 8 comments

What am I doing wrong?

Steps to reproduce the issue:

On a new MacBook Pro running macOS Catalina 10.15.4 (19E2269), I installed rubyc by running the following commands. (I didn't install the Command Line Tools because they seem like they're already there.)

$ brew install squashfs
$ xcode-select -p
/Library/Developer/CommandLineTools
$ which gcc
/usr/bin/gcc
$ which make
/usr/bin/make
$ chmod +x rubyc
$ chmod +x rubyc

Expected

When I run

./rubyc --help

I expected to see a help menu.

Actual

Instead, I see:

Could not find rake-13.0.1 in any of the sources
Run `bundle install` to install missing gems.

I notice that rake 13.0.1 is a dependency in the Gemfile/Gemfile.lock of ruby-packer, not in my own project.

Am I doing something wrong? I'm having a hard time imagining this is because I didn't download the Command Line Tools exactly as specified.

beechnut avatar Aug 12 '20 18:08 beechnut

@beechnut Hi Matt, thank you for reporting the issue! I implemented a "download and run" CI runner last weekend to try reproducing it but failed (see https://github.com/Enclose-IO/rubyc/actions/runs/210418504).

So my guess is that this is due to your environment variable (which probably triggers a bug that needs to be fixed). Could you share with me your environment variables (e.g. the output of env) when encountering this error?

pmq20 avatar Aug 17 '20 17:08 pmq20

Thanks for the quick response! 😊 Here's my ENV, and I don't know if this makes a difference, but all my Rubies are installed through asdf.

TERM_PROGRAM=Apple_Terminal
SHELL=/bin/zsh
TERM=xterm-256color
TMPDIR=/var/folders/zs/q_6xzzbn7jx24lnt722t_wz00000gn/T/
TERM_PROGRAM_VERSION=433
TERM_SESSION_ID=DF8FFFC3-1DC4-43A3-938E-652C90AB7F48
USER=matt
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.k9haaKpctb/Listeners
PATH=/Users/matt/.asdf/shims:/Users/matt/.asdf/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin
PWD=/Users/matt/code/sangha/aspen/aspen
LANG=en_US.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/matt
LOGNAME=matt
OLDPWD=/Users/matt/code/sangha/aspen/aspen
ZSH=/Users/matt/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
ASDF_DIR=/Users/matt/.asdf
_=/usr/bin/ENV

And, just in case, my bundle config:

$ bundle config list
Settings are listed in order of priority. The top value will be used.

jobs
Set for the current user (/Users/matt/.bundle/config): 8

path
Set for the current user (/Users/matt/.bundle/config): "vendor/bundle"

beechnut avatar Aug 17 '20 17:08 beechnut

Hi @pmq20! I’m wondering if you have any suggestions on what I might look into to try to get this working, or any ideas on what the root of the issue is.

Also I understand that this is a part-time project for you and I don’t want you to feel rushed! Very appreciative of your time and effort here.

beechnut avatar Aug 30 '20 15:08 beechnut

@beechnut I still do not have an environment that is able to reproduce it yet. My plan was to embed more debugging facilities and ask you again to see its diagnostic output (like adding a flag to let it print the require-path finding routes). At the moment could you try using it in a different folder and/or different environment (e.g. turning the native Ruby paths off, e.g. rvm). I still believe it's an external environment that interferes with the tool itself and this is probably a bug that we should fix by shielding off those external env factors.

pmq20 avatar Aug 30 '20 18:08 pmq20

Thanks @pmq20! I'm not really sure how to change the environment—I'm using asdf as my version manager, but don't have a detailed understanding of how it works.

I've been trying to write a Dockerfile to isolate and/or solve this issue, but I'm struggling with that too. Is there a ready-to-go Dockerfile that exists for ruby-packer? (I've been looking on other issues but haven't found it yet.)

beechnut avatar Sep 01 '20 19:09 beechnut

@beechnut No there has not been a Dockerfile yet. Pull requests are welcome. Let me start working on adding the debug facilities next weekend, so that you can print more detailed error diagnostic information when running it.

pmq20 avatar Sep 01 '20 23:09 pmq20

Let me start working on adding the debug facilities next weekend

@pmq20 I'd be eager to help out with this, but I don't have any idea where to start. If it would help, I'd like to offer to pair on this—but I don't know if that would help or just slow you down. 🙃 Feel free to let me know, either way.

beechnut avatar Sep 02 '20 18:09 beechnut

I have reproduced this issue, just removing $HOME/bundle/.config solved the issue. It seems rubyc's bundler is messing out with the bundler configuration in HOME. Maybe we just ignore these bundle condig either local or global, what do you think?

josacar avatar Nov 20 '20 17:11 josacar