Ruby Ruby on Rails 5 Basics Creating an App Our First Resource

After installing Homebrew & rvm, cannot find correct bin using ls bin/

I can run ruby -v , but cannot run bin/rails generate scaffold......

1 Answer

Brandon McClelland
Brandon McClelland
4,645 Points

You probably want to look in /usr/bin/ to find stuff. Assuming RVM was installed properly, you should be check it quickly by running rvm list to see which Rubies RVM is managing. If you need to use a different version install it like this:

rvm install ruby-X.X.X

rvm --default use ruby-X.X.X

You probably already had a random Ruby installed just by having OSX but probably not rails. Since rails is just a gem you can add it with

gem search '^rails$' --all # to find rails versions available to you.

gem install rails -v rails_version # replace rails_version with the specific version you want, i.e. 5.1.4

Thank You!