I’m currently using a Mac OSX 10.6.8 and when I tried to create a new controller using the command: $ rails generate controller welcome index in the terminal, nothing happens.
The guide says the following will happen: Rails will create several files and a route for you.
create app/controllers/welcome_controller.rb
``route get "welcome/index"
invoke erb
create app/views/welcome
create app/views/welcome/index.html.erb
invoke test_unit
create test/controllers/welcome_controller_test.rb
invoke helper
create app/helpers/welcome_helper.rb
invoke test_unit
create test/helpers/welcome_helper_test.rb
invoke assets
invoke coffee
create app/assets/javascripts/welcome.js.coffee
invoke scss
create app/assets/stylesheets/welcome.css.scss
Most important of these are of course the controller, located at app/controllers/welcome_controller.rb
and the view, located at app/views/welcome/index.html.erb
.
Open the app/views/welcome/index.html.erb
file in your text editor.
When I try to open the .erb file in my text editor, its not showing up.
What am I doing wrong here?