Monday, May 17, 2010

Ruby on Rails

http://railstutorial.org/book

http://guides.rubyonrails.org/getting_started.html

http://edgeguides.rubyonrails.org/3_0_release_notes.html#creating-a-rails-3-0-application (v 3.0)
http://railstutorial.org/book?version=2.3.8 (v 2.3.8)

RVM to manage different versions
http://rvm.beginrescueend.com/rvm/install/
$ rvm update --head
$ rvm reload
$ rvm install 1.8.7
$ rvm install 1.9.2

app/ Core application (app) code, including models, views, controllers, and helpers
config/ Application configuration
db/ Files to manipulate the database
doc/ Documentation for the application
lib/ Library modules
log/ Application log files
public/ Data accessible to the public (e.g., web browsers), such as images and cascading style sheets (CSS)
script/rails A script provided by Rails for generating code, opening console sessions, or starting a local web server
test/ Application tests (made obsolete by the spec/ directory in Section 3.1.2)
tmp/ Temporary files
vendor/ Third-party code such as plugins and gems
README A brief description of the application
Rakefile Utility tasks available via the rake command
Gemfile Gem requirements for this app
config.ru A configuration file for Rack middleware
.gitignore Patterns for files that should be ignored by Git

http://www.wellho.net/solutions/ruby-conditionals-loops-and-iterators-in-ruby.html
$ ruby
# An iterator object revealed!
(5..15).each do |k|
print k," "
end
print "\n"
5 6 7 8 9 10 11 12 13 14 15

REpresentational State Transfer (REST)
As a Rails application developer, the RESTful style of development helps you make choices about which controllers and actions to write: you simply structure the application using resources that get created, read, updated, and deleted.

No comments: