Ruby on Rails Tutorial - Part 1, Setting Up a Rails Web Application Project
Written By: Mark Stansberry, BookMark Tutoring
Email: mark.c.stansberry@gmail.com
Cell/Text: (707)235-4095
After you have installed rails, the next step is to create a Rails project directory and generate the files needed to generate the framework of your web database application. You must first decide on a name for your Rails project and the project directory that it is located in.
For this Rails web database application the project name, "myapp" was chosen and the directory for the Rails project was chosen to be C:\Users\mark.c.stansberry
After opening up the "Start Command Prompt" window on your windows desktop, you must execute the command "rails new myapp" at the file directory location. For this example, the command below was entered in at the command line prompt to generate the Rails web database framework for the myapp application
C:\Users\mark.c.stansberry>rails new myapp
After pressing enter on the keyboard, the command line editor displays the commands it executes in order to construct the myapp web database application framework.
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/javascripts/application.
create app/assets/stylesheets/application.
create app/controllers/application_control
create app/helpers/application_helper.rb
create app/views/layouts/application.html.
create app/assets/images/.keep
create app/mailers/.keep
create app/models/.keep
create app/controllers/concerns/.keep
create app/models/concerns/.keep
create bin
create bin/bundle
create bin/rails
create bin/rake
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_silen
create config/initializers/filter_paramete
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/secret_token.rb
create config/initializers/session_store.r
create config/initializers/wrap_parameters
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create lib
create lib/tasks
create lib/tasks/.keep
create lib/assets
create lib/assets/.keep
create log
create log/.keep
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/robots.txt
create test/fixtures
create test/fixtures/.keep
create test/controllers
create test/controllers/.keep
create test/mailers
create test/mailers/.keep
create test/models
create test/models/.keep
create test/helpers
create test/helpers/.keep
create test/integration
create test/integration/.keep
create test/test_helper.rb
create tmp/cache
create tmp/cache/assets
create vendor/assets/javascripts
create vendor/assets/javascripts/.keep
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.keep
run bundle install
Most of the commands that are executed when the rails new myapp command is entered are used to create files and associated directory locations to store those files for the framework. These include configuration files, test, library, and database files.
The last command that is executed is the "run bundle install" command. The bundle command is used continually for the build and rebuilding of your web framework application.
About the author: Mark Stansberry teaches Ruby and Ruby-on-Rails for BookMarkTutoring.com. He has over 15 years in technology training, technical writing and code development. Besides teaching at BookMark, Mark is responsible for the development of BookMark's online learning productivity tools. Mark's current application programming interests include parametric and fractal based graphic design automation, cloud computing and biological system simulation.
Email: mark.c.stansberry@gmail.com
BookMark Magazine, an educational publication from BookMarkTutoring.com, provides educational supplemental material for students and teachers. These range from captivating educational classroom activities, such as click and color educational coloring pages and our Infinity Machine online drawing software (mathematical brush driven) to subject specific learning link libraries.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment