- Ruby on Rails Tutorial: Learn Web Development with Rails
- Eloquent Ruby [Review]({% post_url 2013-08-27-book-review:-eloquent-ruby %})
- Metaprogramming Ruby
- The RSpec Book [Review]({% post_url 2013-09-14-book-review:-the-rspec-book %})
- Practical Object-Oriented Design in Ruby
- Objects on Rails
- David …
- objects are collections of instance variables and a link to their class
- Classes are instances of Class which is a subclass of Module
- CamelCased
- Objects of the same class can have different sets of instance variables as they only exist upon assignment
- The object …
- Speed of service: no code execution means the limiting factor is how fast …
Ruby and Rails Book List July 16th 2013
Read
Ruby Notes July 16th 2013
Objects
Classes
Instance Variables
Method calls
Rails notes June 8th 2013
Create a controller without tests.
rails generate controller {controller name} {views/methods} --no-test-framework
Create integration test
rails generate integration_test {test_name}
Roll back a migration
rake db:rollback
Rspec test for Mass Assign Vulnerbility (or attribute not being accessible):
describe …
Rails app start guide June 7th 2013
Set up a rails app with heroku, zerigo DNS, and bitbucket in one pomodoro:
rails new {app_name} --skip-test-unit
cd {app_name}
git init
git add .
git commit -m "generated skeleton"
vim Gemfile
Gemfile changes
< gem 'sqlite3'
---
> group :development do
9a10,11
> gem 'sqlite3'
> end …
Notes on creating a new ruby project May 3rd 2013
Quickest way to set up a new project. Use snake_case on project name.
bundle gem my_gem_name
cd ./my_gem_name/
git commit -m "empty project"
rspec --init
Setting up Jekyl in a sub directory April 24th 2013
Jekyll is a blog-aware static site generator. The operative words in that sentence being static site, there is no php, no database, running on this blog. There are few advantages to this setup over the traditional alternatives such as wordpress:
Useful Rail Gems March 24th 2013
Below are a list of Gems have found to be useful as I was learning rails:
Testing
gem 'factory_girl_rails'
FactoryGirl automates the process of model creation for the purpose of testing.
gem 'launchy'
Launch allows you to open a webpage in testing, good for debugging tests
gem 'annotate' …
Installing Rails February 6th 2013
Ruby rails install
sudo apt-get install ruby rubygems
Install rails:
gem install rails
Long wait and then this result:
Fetching: i18n-0.6.1.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /var/lib/gems
Installing RVM per Stackoverflow answer .:
curl -L https://get.rvm.io | bash …