rbenv: ruby: command not found
Try the following piece of code depending on the current version of rails that you have installed. In my case am using v2.3.3
rbenv global 2.3.3
Even setting global or local doesn't work if you haven't set this
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
exec $SHELL
The complaint you get comes from rbenv. The fact that it's complaining shows that rbenv is set up and working.
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.
If the version is not specified in a .ruby-version file, create the .ruby-version file in the project directory.
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.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.
install the bundler tool:
gem install bundler
.install the dependancies of the project:
bundle install
run your project using the exact versions of libraries it specifies:
bundle exec rails server