Rbenv: Ruby: Command Not Found

rbenv: ruby: command not found

  1. The complaint you get comes from rbenv. The fact that it's complaining shows that rbenv is set up and working.

  2. Figure out what version of Ruby is needed to run the project. Either the project comes with a .ruby-version file in the root, or someone on the project will know and recommend that version to use.

  3. If the version is not specified in a .ruby-version file, create the .ruby-version file in the project directory.

  4. type ruby -v while in that directory. Is it OK? Then you have the version of Ruby installed that matches what your .ruby-version is asking for.

  5. If the last command was not OK, then type rbenv install.

Now that Ruby is installed, you need to run your program. I'm assuming it comes with a Rakefile.

  1. install the bundler tool: gem install bundler.

  2. install the dependancies of the project: bundle install

  3. run your project using the exact versions of libraries it specifies: bundle exec rails server

rbenv: bundler: command not found

I fixed it by running the command gem install bundler in the root directory of the rails app.

ruby cmd not working in folders rbenv: ruby: command not found

It is weired but it could be a different .local file inside the test folder. Run rbenv version in both folder so we can see if there is a local setting for rbenv.

Command 'rbenv' not found, but can be installed with

Well in the github repo I can't seem to find the method/script you are using to install.

just use the complete manual approach as specified on the website as of today.

remove every rbenv related line first from your ~/.bashrc, and rm -rf ~/.rbenv then just copy-paste the below lines.

git clone https://github.com/rbenv/rbenv.git ~/.rbenv --depth=1 #shallow clone cuz ig u just want to use it
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc

should work just fine, + you get the additional benefit of getting the latest version. whenever you wish to update just cd ~/.rbenv && git pull

comment if still issues.



Related Topics



Leave a reply



Submit