Tags » Ruby On Rails

difference between gemfile and gemfile.lock in Ruby on rails

gemfile and gemfile.lock is at centerstage for managing gem dependency. They are byproduct of bundler gem. If you are using RVM this gem is installed by default. 377 more words


Form validation with Jquery


<form action=”” method=”post” id=”register-form” enctype=”multipart/form-data” style=”margin-bottom:110px;”>

Name: <input type=”text” name=”name” id=”firstnam name” >

<input type=”submit” value=”Register Now” name= “Submit”>




$(function() {

26 more words

Page caching with Rails 4, with nginx and puma

The built-in page caching has been extracted to a separate gem in Rails 4 and here is a guide how to use it. First we need to add the gem to our Gemfile: 409 more words

javascript validation for image size, image format & preview uploaded image before upload.


                  <input type=”file” name=”dataFile” id=”fileChooser” onchange=”return ValidateFileUpload()” />
                 <img src=”images/noimg.jpg” id=”blah”>
function ValidateFileUpload() {
var fuData = document.getElementById(‘fileChooser’);
var FileUploadPath = fuData.value; 119 more words


Jumping ahead to Rails.

It’s been a long time since I’ve posted a programming related post, and it’s mainly because I haven’t really had anything of substance to talk about. 1,067 more words


Preview image before upload on server.

<input type=”file” onchange=”loadFile(event)”>
<img id=”output”/>

var loadFile = function(event) {
var reader = new FileReader();
reader.onload = function(){
var output = document.getElementById(‘output’);
output.src = reader.result; 6 more words


4 amazing time savers for Ruby on Rails developers

Time is money and developers (and especially project managers) know this like no other. Rubyroid Labs Team has picked up for you a set of 4 great tools that would help one a lot with Ruby on Rails development and would simply make life of every developer easier and happier. 22 more words

Ruby On Rails