Skip to content

Commit 2501a47

Browse files
committed
Rails basics
Signed-off-by: Yury Kaliada <fut.wrk@gmail.com>
1 parent 2909e3a commit 2501a47

File tree

4 files changed

+89
-1
lines changed

4 files changed

+89
-1
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby-2.1.5
1+
ruby-2.2.2

files/.ruby-gemset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
courses

files/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.1.4

notes/21 - Rails basics.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Rails basics
2+
3+
###What is Rails?
4+
Rails is a web application development framework written in the Ruby language. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started.
5+
6+
The Rails philosophy includes two major guiding principles:
7+
8+
Don't Repeat Yourself: DRY is a principle of software development which states that "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." By not writing the same information over and over again, our code is more maintainable, more extensible, and less buggy.
9+
Convention Over Configuration: Rails has opinions about the best way to do many things in a web application, and defaults to this set of conventions, rather than require that you specify every minutiae through endless configuration files.
10+
11+
12+
### Installing rails
13+
```
14+
$ gem install rails
15+
$ rails --version
16+
$ rails new my_app
17+
```
18+
19+
### Files
20+
21+
Describe each folder and it's content
22+
23+
### Run server
24+
25+
```
26+
rails s
27+
```
28+
29+
### Scaffolding
30+
31+
```
32+
rails generate controller welcome index
33+
rails g model User
34+
rails g migration Name field:type
35+
rails g scaffold
36+
```
37+
38+
### Routes
39+
40+
Take care of `root` path
41+
42+
```
43+
root 'welcome#index'
44+
```
45+
46+
# Useful gems
47+
48+
```
49+
gem 'nokogiri'
50+
51+
gem 'cancancan'
52+
gem 'capistrano'
53+
gem 'coffee-rails', '~> 4.0.0'
54+
gem 'font-awesome-rails'
55+
gem 'httparty'
56+
gem 'i18n-js'
57+
gem 'oauth2'
58+
gem 'paperclip'
59+
gem 'pdfkit'
60+
gem 'pg'
61+
gem 'rabl'
62+
gem 'rails', '4.2.0'
63+
gem 'sass-rails', '~> 5.0.1'
64+
gem 'sidekiq'
65+
gem 'slim'
66+
gem 'sorcery'
67+
gem 'uglifier', '>= 1.3.0'
68+
gem 'unicorn'
69+
gem 'whenever', :require => false
70+
gem 'paranoia', '~> 2.0'
71+
72+
73+
group :test do
74+
gem 'vcr'
75+
gem 'webmock'
76+
end
77+
78+
group :development, :test do
79+
gem 'rspec'
80+
gem 'database_cleaner'
81+
gem 'factory_girl_rails'
82+
gem 'jazz_hands', github: 'nixme/jazz_hands', branch: 'bring-your-own-debugger'
83+
gem 'proxylocal'
84+
gem 'quiet_assets'
85+
end
86+
```

0 commit comments

Comments
 (0)