Every Rails commands are rails new



Rails commands run Rails new. I used rails generate scaffold User name:string email:string and i have this error:
rails new APP_PATH [options]
Options: -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /usr/local/rvm/rubies/ruby-2.3.0/bin/ruby -m, [--template..........

same error for rails console and rails generate user

Any solution to solve it ?


Getting started with rails, you should read this:

3.2 Creating the Blog Application
Rails comes with a number of scripts called generators that are designed to make your development life easier by creating everything that’s necessary to start working on a particular task. One of these is the new application generator, which will provide you with the foundation of a fresh Rails application so that you don’t have to write it yourself.

To use this generator, open a terminal, navigate to a directory where you have rights to create files, and type:

$ rails new blog
This will create a Rails application called Blog in a blog directory and install the gem dependencies that are already mentioned in Gemfile using bundle install.

After that $ cd blog
Now you are ready to use rails generate ... etc …