![](/images/ajax-loade.gif)
Featured
-
Installing RVM and Creation of Gemsets Part 2
In the last tutorial we learnt how to install RVM.
by dinesh.singh -
Installing RVM and Creating of Gemsets Part 1
Installing RVM and creating Gemsets can be difficu
by dinesh.singh -
Use pik in Windows
Managing multiple versions of Ruby on Windows can
by anirudh.rautela -
Using Bundler in Rails 2.3.x app
Managing Gems in Rails can be infuriating at times
by anirudh.rautela
Tags
List of Top 10 Ruby on Rails Interview Questions for 2019
Ruby on Rails is a server-side framework written in ruby which provides a default structure for a database, web service and web pages. Ruby on rails uses web standards like JSON for data transfer and user interfacing. Companies including software...
Integrating payment gateway in Rails - Part 1
Payment gateways are used in websites for online shopping and money transactions. It safely handles customer payments. Payment gateway can easily be integrated in Rails application. Few applications for payment gateway integration in Rails are Sr...
How to install Ruby on Rails on Ubuntu 14.04 ?
Install Ruby On Rails: Quickest way
The quickest way of installing Ruby on Rails with rvm is to run the following commands:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get....
difference between HAS_ONE and BELONGS_TO association in rails?
Has_one and Belongs_to relationship sometime become confusing so the main difference can be explained with the help of example:
1>Has_one :-
class Department < ActiveRecord::Base
has_one: employee
end
this means that employee tab...
How to print an object's class & contents in Rails
If i have a User object say user, i.e
>> user = User.find(1)
=> #<User id: 1, login: "james.warner", email: "james.warner@evontech.com",created_at: "2013-11-18 07:12:45", updated_at: "2014-02-03 10:51:02", designation: "Programmer...
How to avoid automatically updating rails timestamp fields ?
If you have created_at and updated_at columns in the DB table. Rails will automatically set these values when you create and update a model object. There are chances that we have to update the columns without touching these columns.
You can do...
Batch update in ROR
There are always a requirement when you have to update the multiple records at the same time using ActiveRecord with a single HTTP request. All you have to do is create a hash with keys as the primary key and value as another hash of all the fiel...
Remove Leading, Trailing and other consecutive white spaces in a string in RoR
There are innumerous ways to remove extra white spaces from a string in Ruby on Rails.
Here i am demonstrating 3 ways which you can use to achieve the desired result.
1> squish function :
This function was introduced in Rails framewor...
SETTING UP ROR FOR THE FIRST TIME ON A NEW UBUNTU SYSTEM USING RVM
1> We need to install RVM before we can install Ruby, because RVM is a version manager and it will help us to install & manage different versions of Ruby on the same system and easily switch between them.
To install RVM we first need to...
Collect and Map In Ruby On Rails
Map:
Map use to take the object of enumerable and returns a new array with the results of running block once for every element in enum, the block is something like [1,2,3].map { |a| a+2 }
and the outcome of [1,2,3].map { |a| a+2 } will be [3...
Installing RVM and Creation of Gemsets Part 2
In the last tutorial we learnt how to install RVM. In this one we will take one step further by creating Gemsets.
Note - Gemsets are used to eliminate Gem clutter and version mismatches. Also by creating Gemsets we can install multiple version...
Installing RVM and Creating of Gemsets Part 1
Installing RVM and creating Gemsets can be difficult at times. Frown not because in this tutorial we will learn the basics of installing RVM and in part 2 of the tutorial we will be creating Gemsets.
Quick Revision
RVM helps to manage multi...
Use pik in Windows
Managing multiple versions of Ruby on Windows can be a harrowing task since RVM is not present for Windows environment. And suppose you want to install different projects which require different version of Ruby and Rails on Windows.
Can be a ...
Using Bundler in Rails 2.3.x app
Managing Gems in Rails can be infuriating at times especially when Bundler is not present. That is what happens when you use Rails version lower than 3 as it does not come bundled with Bundler.
A quick fresh up though as why we use Bundler -
...