Ubuntu – “node: No such file or directory” error on using express-generator

Issue: After you install express-generator on your Ubuntu machine and try to run it like express -h You may encounter an error saying "/usr/bin/env: node: No such file or directory" Solution: The issue is that the Node executable for Ubuntu is nodejs instead of node. So to get around this situation, we can create a symbolic […]

Uploading multiple files with Carrierwave in Rails 4

This post shows how to use carrierwave gem to upload multiple files in Rails 4 Let suppose the following scenario. We have multiple projects and each project can have multiple screenshots. In project.rb class Project < ActiveRecord::Base has_many :screenshots accepts_nested_attributes_for :screenshots, :allow_destroy => true end In screenshot.rb class Screenshot < ActiveRecord::Base belongs_to :project mount_uploader :image, ScreenshotUploader […]

Using has_many with Nested Form in Rails 4

This post shows how to use field_for and accepts_nested_attributes_for to created nested form for has_many model Let suppose the following scenario. We have multiple projects and each project can have multiple screenshots. Following will be the definition of model classes. class Project < ActiveRecord::Base has_many :screenshots end class Screenshot < ActiveRecord::Base belongs_to :project end Now while […]

Using Private key for File Transfer (SFTP)

This article is intended for the members of TeamDX. Following are the steps you need to take in order to transfer files using private key (without password) provided to you by your team lead.  Open the FileZilla client. From the top of the home screen, click on Edit and select Settings. On the left side of the menu, expand […]

Using Private key with PuTTY

This article is intended for the members of TeamDX. Following are the steps you need to take in order to log in to server using private key provided to you by your team lead.  Start PuTTY by double-clicking its executable file. PuTTY's initial window is the Session Category (navigate PuTTY's various categories, along the left-hand side of […]

Using Twitter Bootstrap with Ruby on Rails

Step by step guide to integrate Twitter Bootstrap with Ruby on Rails application. Please note that after these steps, your application layout file will be replaced with default one. Step1: Add gem to your Gemfile gem 'twitter-bootstrap-rails' Step 2: Install required gem. To do that, on terminal, run bundle install Step 3: Run bootstrap install scripts […]

Error installing debugger gem on ubuntu

I recently encountered error while bundle install. The issue was with debugger gem. Following is the error I was getting No source for ruby-1.9.3-p484 provided with debugger-ruby_core_source gem. extconf.rb failed After searching Google for answer, I found that this gem depends upon another one named "debugger-ruby_core_source" as specified in error. So to successfully install debugger, […]

500 error with rails application running in production via apache2 & passenger

I sometimes face 500 Internal Server Error when running Ruby on Rails application on Apache Passenger but the same application is working fine with webrick server. One of the following reasons are responsible for the issue. 1. Permission Issues Check permission of the files and directories of your project. It should be writeable by the […]