3448541362640137
Or if you want to get all 21st Century:
C:\myruby>rails new AustinGP
create
create README
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/mailers
create app/models
create app/views/layouts/application.html.erb
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/secret_token.rb
create config/initializers/session_store.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create doc
create doc/README_FOR_APP
create lib
create lib/tasks
create lib/tasks/.gitkeep
create log
create log/server.log
create log/production.log
create log/development.log
create log/test.log
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/index.html
create public/robots.txt
create public/images
create public/images/rails.png
create public/stylesheets
create public/stylesheets/.gitkeep
create public/javascripts
create public/javascripts/application.js
create public/javascripts/controls.js
create public/javascripts/dragdrop.js
create public/javascripts/effects.js
create public/javascripts/prototype.js
create public/javascripts/rails.js
create script
create script/rails
create test
create test/fixtures
create test/functional
create test/integration
create test/performance/browsing_test.rb
create test/test_helper.rb
create test/unit
create tmp
create tmp/sessions
create tmp/sockets
create tmp/cache
create tmp/pids
create vendor/plugins
create vendor/plugins/.gitkeep
<span style="color:rgb(0,0,0);font-family:Verdana, Trebuchet, Verdana, sans-serif;font-size:13px;Now, you have to generate a controller which will handle your AustinGP request.
C:\myruby\AustinGP>rails generate controller welcome
create app/controllers/welcome_controller.rb
invoke erb
create app/views/welcome
invoke test_unit
create test/functional/welcome_controller_test.rb
invoke helper
create app/helpers/welcome_helper.rb
invoke test_unit
create test/unit/helpers/welcome_helper_test.rb
<span style="color:rgb(0,0,0);font-family:Verdana, Trebuchet, Verdana, sans-serif;font-size:13px;Now, the controller file is named as welcome_controller.rb after the name we provided to the controller. Now, if you open this controller file, you will find the following piece of code
class WelcomeController < ApplicationController
end
<span style="color:rgb(0,0,0);font-family:Verdana, Trebuchet, Verdana, sans-serif;font-size:13px;Now, you have to make this controller to respond to a request of "It makes economic sense to go to the AustinGP ". To do this, edit the welcome.controller.rb file to define an action.
class WelcomeController < ApplicationController
def austingp
@message = '<span style="color:rgb(0,0,0);font-family:Verdana, Trebuchet, Verdana, sans-serif;font-size:13px;It makes economic sense to go to the AustinGP'
end
end
<span style="color:rgb(0,0,0);font-family:Verdana, Trebuchet, Verdana, sans-serif;font-size:13px;text-align:justify;In the controller file, we had an action named "austingp". So, inside the app/views/welcome folder, we will create a file called austingp.html.erb which will be used as a template to respond to the action of "austingp". Rails automatically renders the file, when it is named in this fashion. ERb is Embedded Ruby output tags. Create a file with the name austingp.html.erb and put the contents as shown below:
<html>
<body>
Message!
<h3><%= @message %></h3>
</body>
</html>
<span style="color:rgb(0,0,0);font-family:Verdana, Trebuchet, Verdana, sans-serif;font-size:13px;Edit the config/routes.rb file and add the information as shown below;
AustinGP::Application.routes.draw do
match ':controller(/:action(/:id(.:format)))'
end
<span style="color:rgb(0,0,0);font-family:Verdana, Trebuchet, Verdana, sans-serif;font-size:13px;All set now. You can start the built in web server by using "rails server" command inside the project folder.
C:\myruby\helloworld>rails server
<span style="color:rgb(0,0,0);font-family:Verdana, Trebuchet, Verdana, sans-serif;font-size:13px;If you access "
http://localhost:3000/welcome/AustinGP", you should see your first program in Rails on action...
<span style="font-size:14px;<span style="color:rgb(0,0,0);font-family:Verdana, Trebuchet, Verdana, sans-serif;It makes economic sense to go to the AustinGP