ROR 4 essential training Flashcards
(202 cards)
what is rails
opensource web app framework
what is dry (fundamental to rails)
dont repeat yourself
provides consise consistant code
convention over configuration (second fundamental of rails)
sensible defaults, only specify unconventional aspects
this increases speed bc we have default code to rely on and less code to maintain
model
data objects (like objects in database)
view
basically what you see (html, css, etc)
controller
makes decisions and controls aoo based on interaction
what does rails call the controller
ActionController
What does rails call the view
ActionView
what does rails call the model
ActiveRecord
what is ActionPack
the controller and view packaged together as one thing (ActionController and ActionView)
update rubygems
gem update –system
bundler gem helps how
installs all the gems for a particular rails aplication/environment (different versions for different applications, etc)
list installed gems
gem –list
install a gem (and flags to not install ri or rdoc, and specify version)
gem install x –no-ri –no-rdoc –version 4.0.0
what web servers does rails run by default
webrick
for deployment rails should be hosted on another server such as
apache,nginx
how to create rails project
rails new projec_name -d server_type
where is the root of the directory of the project
project_name/
gemfile contains what
gems we want to load, and their version/source
gemfile.lock contains what
all the gems, and what those gems depend on
how to install new gems
add to gem file then run bundle install
how to start rails server
rails s
default port for webrick
3000
database.yml
located in the config folder, contains configuration for connecting to the database