- Setup
- Swapfile
- NGINX
- ElasticSearch
- RVM
- Rails
- Postgres
- Capistrano
1. Знание основ Ruby, фреймворка Ruby on Rails | |
- http://guides.rubyonrails.org/ | |
- http://rusrails.ru/ | |
Вопросы: | |
1. Чем отличается статическая и динамическая типизации в языках программирования? | |
2. Какие виды наследования поддерживаются в Ruby? | |
3. Что такое модуль? Какая разница между классом и модулем? | |
4. Какие есть уровни контроля доступа к методам для классов и модулей? | |
5. Какие есть способы вызова методов в Ruby? | |
6. Что означает ключевое слово self? |
$ uname -r
.git | |
.gitignore | |
/doc | |
.yardoc | |
coverage | |
jsdoc | |
/tmp | |
/log | |
Dockerfile | |
Dockerfile.prod |
https://github.com/jnicklas/carrierwave
This example will create an uploader that will upload a file stored in a model Model. The file will be stored locally in development and test environment and will use Amazon S3 in production.
First add the gems.
source 'https://rubygems.org' | |
gem 'rails', '3.2.3' | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do | |
gem 'sass-rails', '~> 3.2.3' | |
gem 'coffee-rails', '~> 3.2.1' | |
# See https://github.com/sstephenson/execjs#readme for more supported runtimes |
Dear Rubyists,
I just lost a contract because of my code in a Rails project.
The specific code in question is related to a "posting a comment" feature. Here are the details:
In this project, "posting a comment" does not simply entail inserting a row into the database. It involves a procedure to yes, insert a row, but also detect its language, check for spam, send emails, and "share" it to Twitter and Facebook. I believe this algorithm should be encapsulated. I do not believe it belongs in a controller or a model. I do not believe Active Record callbacks should be used.
The "senior developer", whom is the stake holder's right hand man, said this:
If: | |
- you add and commit with the wrong email address in git, and | |
- your remote has a hook set up to prevent you from pushing with the bad address | |
Then you need to amend the author of your commit before push can succeed: | |
1. fix your email address in git config: | |
$ git config user.name "Your Name" |