<georgemp>
i have rake installed (gem install rake), but, I keep getting this error - `find_spec_for_exe': can't find gem rake (>= 0.a) with executable rake (Gem::GemNotFoundException). Any ideas on why this would be?
<Guimauve>
georgemp - i'm half awake and have covid so don't expect entirely coherent statements out of me... but do you have multiple installs of ruby on that machine? like... a system ruby and a local one? if you have env variables set up for a local ruby, but it's running /usr/bin/rake and you don't have a local rake installed, that'd be a problem.
protektwar has joined #ruby
protektwar has joined #ruby
<Guimauve>
georgemp - or, if something else is loading and USING rake, you may have installed the wrong VERSION of rake
protektwar has left #ruby [#ruby]
<georgemp>
Guimauve: thanks for trying to help with covid. hope you feel better.
<Guimauve>
thanks
<Guimauve>
i was just surprised to see someone actually use this channel. seems everyone is on the damn discord.
<georgemp>
i believe there would be a system ruby on macOS. I have rvm installed. `rvm list` shows ruby-3.1.2 as default. `which rake` shows the one in rvm 3.1.2
<georgemp>
but this is being run from another program
<georgemp>
a ruby shell script (?). via `run "rake build"`. let me try to figure out which version of rake that is using
<Guimauve>
yeah, but the rvm directory binaries load the version-specific binaries, so that doesn't mean it's installed for your ruby version. if i remember? hmm. another possibility is that you're running something that uses bundler and you didn't bundler install. but if you know enough to use rvm then i doubt you're making that mistake. that's like asking
<Guimauve>
someone "did you turn the computer on"
<Guimauve>
oh, no, rvm doesn't do that any more. it actually puts the version specific binary on the path now. my bad
<georgemp>
oh fwiw i'm just stumbling along trying to build this gem :)
<georgemp>
so please assume i know nothing
<Guimauve>
...and that version would load pretty much any version of rake, as we're now on 13.0.6, so as long as you have -any- version of rake installed, it should find rake
<georgemp>
I tried putting `run "which rake"` in that ruby script. and, it output `/Users/georgemp/.rvm/gems/ruby-3.1.2/bin/rake` which seems to be the one it should be looking fo
<Guimauve>
georgemp - if the directory for the build has a "Gemfile" file, then you want to be using bundler, specifically "bundle install" and "bundle exec" https://bundler.io/v2.3/man/bundle-install.1.html
<georgemp>
`/Users/georgemp/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems.rb:265:in `find_spec_for_exe': can't find gem rake (>= 0.a) with executable rake (Gem::GemNotFoundException)` - but the file path on this error message seems to be referring to ruby 3.1.0
<georgemp>
let me try the bundle install
<georgemp>
Guimauve: thank you ..that seems to have resolved this