Setting up RubyOnRails environment on Ubuntu 14.04

Posted Over 9 years ago by konjoot.

This tutorial is about setting up environment for RubyOnRails on Ubuntu 14.04. First of all, update & upgrade your system:

ActiveRecord models localization

Posted About 10 years ago by konjoot.

Suppose we have some model and we want to localize it, first of all we need to now i18n_key...

Capistrano deploy.rb examples

Posted Over 10 years ago by konjoot.

All examples here for deploy RoR application with unicorn, staging machine (where we deploys) available via ssh by ssh_key...

Deploy rails apps with capistrano

Posted Over 10 years ago by konjoot.
robmclarty.com

Install capistrano: add to Gemfile group :development do gem 'capistrano' gem 'rvm-capistrano' end Then cd to project root folder...

Setup postgresql for RoR

Posted Over 10 years ago by konjoot.

Assume your database.yml file looks like this: {: .yaml} development: adapter: postgresql host: localhost encoding: unicode database: proj_development

Ubuntu postgresql 9.3 installation for RoR

Posted Over 10 years ago by konjoot.

Add repository and install Postgresql: ^ sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list" ^ wget --quiet -O...

Rails migration add float point field with scale and precision

Posted Over 10 years ago by konjoot.

class CreateFakes < ActiveRecord::Migration def change create_table :fakes do |t| t.decimal :float_value, :precision => 4, :scale => 3 end

Rspec + Capybara + Rails4 + Spork (intergation tests setup with selenium and poltergeist)

Posted Over 10 years ago by konjoot.

Add in Gemfile: group :development, :test do gem 'rspec-rails' gem 'spork-rails' end group :test do gem 'capybara'

Javascript with Turbolinks in Rails 4

Posted Over 10 years ago by konjoot.

If some of your scripts don't work with turbolinks, you should do the following: ready = -> #your code here