Skip to content
How to print a document as a booklet
Posted 2039 days ago

After spending about an hour, reams of pages, and pails of ink, I finally stumbled into the magic of booklet printing. My source document was a MS-Word 2010 document with…

How to print a document as a booklet
Installing Rails plugins from Github on Windows
Posted 3058 days ago

Well, I have installed several Rails plugins but I was bummed when I tried to install the re-captcha plugin from Github. The command belwo just fails silently and creates an…

How to install RMagick + ImageMagick on Windows
Posted 2821 days ago

I have installed RMagick and Image Magick on many Windows machines and I have stumbled across various kinds of errors, and finally I have decided to document them so that…

Installing gems behind proxy servers
Posted 3478 days ago

It is well documented as part of gem help that using the following common options:

-p, --[no-]http-proxy [URL]      Use HTTP proxy for remote operations

will allow gem to use the proxy server…

ruby-alibris wrapper wins
Posted 2272 days ago

I had blogged about my recent open-source project, a Ruby wrapper for the Alibris API, ruby-alibris. Soon after, Alibris had announced their First Annual Alibris API Programming Contest, and I submitted…

Playing with CoffeeScript
Posted 2440 days ago

After having used Haml and Sass and loving them, a friend introduced me to CoffeeScript. In short CoffeeScript is to Javascript as Haml is to Html and Sass is to…

Playing with CoffeeScript
Error in Ruby relative_path_from call on Windows
Posted 2678 days ago

I was recently working on some code for building an extension for Spree, when I ran into an issue while generating a extension controller. The error only happens on Windows.

The…

Rails Magazine releases free Issue #5 digital edition
Posted 2827 days ago

Themed in beautiful Winter art and pictures, Rails Magazine released their Issue #5 free digital edition to the whole Ruby and Rails community worldwide.

It is the largest issue since we…

Rails Magazine releases free Issue #5 digital edition
Tip: has_one and nested form/attributes
Posted 2962 days ago

Although, the usage of nested forms with has_many associations is well documented, I found that especially the call ..build that works for has_many associations do not work for has_one associations.…

Install SQLite3 on Windows
Posted 3041 days ago

I found this great screencast that shows how easily you can install SQLite3 on Windows. So, here you go:

Install SQLite3 on Windows

PreviousNext

Jul 26 / Rupak Ganguly

How to: Edit Rails app online with HerokuGarden

In a previous post, I talked about How to: Deploy application from Git repo to Heroku. Now, let’s be a little more adventurous and see if we can make changes to code using an online code editor at HerokuGarden. That gives us immense freedom to make changes to our application from anywhere you are as long as you have an internet connection and a browser. Let’s see step-by-step how that can be done.

read more…


Jul 25 / Rupak Ganguly

How to: Deploy application from Git repo to Heroku

Well, I am sure you have looked for a less expensive (maybe free!) Rails hosting solution. I use a solution that lets me test drive or deploy an idea I want to show to a client or a friend quickly. Anyway, the point of this article is a quick and possibly free deployment solution that does the job. It focuses on getting the application deployed rather than worry about the setup, database migrations and configuration involved at the hosting provider. I found Heroku to fit the bill perfectly. So, here is a run down on how you could try it as well.

read more…


Jun 20 / Rupak Ganguly

Rails Magazine releases print edition of Issue #3

railsmagazine-cover3 The print edition of Rails Magazine Issue #3 was released today. The free online digital version is soon to follow in a week. You can buy the print edition now. I am very proud to have done three interviews with big names in the Rails world: Carl Mercier, Ilya Grigorik and Ryan Singer. Apart from the interviews this issue is a big one. It has illustrations by DHH. It is packed with nice articles:

  • Create a code snippet app
  • Working on a typical Open Source Rails project
  • Theme Support
  • Observer and Singleton design patterns
  • JRuby monitoring with JMX
  • Ruby Web Frameworks: A Dive into Waves
  • How to Implement Automated Testing
  • Ruby on Rails & Flex
  • Workflow solutions with AASM

Please check back our site for our next regular edition – coming soon!

It was great fun to work on this issue. Let me know in the comments if you liked it. It helps us to bring you stuff that you like.


May 28 / Rupak Ganguly

Install SQLite3 on Windows

I found this great screencast that shows how easily you can install SQLite3 on Windows. So, here you go:

Install SQLite3 on Windows

May 14 / Rupak Ganguly

Ruby on Rails resources for newbies

Beginner Books

  • Agile Web Development with Rails Edition 3
  • Build Your Own Ruby on Rails Web Applications by Patrick Lenz

Advanced Books

  • Advanced Rails Recipes: 84 New Ways to Build Stunning Rails Apps, by Mike Clark
  • The Rails Way
  • The Ruby Way by Hal Fulton

Free eBooks

http://freecomputerbooks.com/langRubyBooks.html

But, I would also suggest you check out these other free resources which keeps up to date with the technology.

read more…


May 13 / Rupak Ganguly

Rails Magazine releases PDF version of Special Edition – RailsConf 2009 Report

Digital Edition of RailsConf 2009 Report After Rails Magazine released the print version of the Special Edition – RailsConf 2009 Report, today they released the downloadable digital edition (PDF). Go grab it from the Rails Magazine website here and while you are there, take the survey to tell us what you like or dislike. Do not forget to share the news.

Apart from me putting in a lot of effort on this special edition as an editor, I managed to get out an article and also landed two interviews with Ryan Bates (http://railscasts.com) and Geoffrey Grosenbach (http://peepcode.com).

Download digital edition

This concise issue of Rails Magazine covers RailsConf 2009 – in-depth commentary, photography and pointers to related resources.

Interviews with attendees:

If you did not attend RailsConf, this is one of the best ways to get up to speed on the conference, what’s planned for Rails 3 and related information. For those who attended, this should provide a good recap and insights by presenting different perspectives.

Please check back our site for our next regular edition – coming soon!

It was great fun to work on this special report on RailsConf. Let me know in comments if you liked it. It helps us to bring you stuff that you like.


May 12 / Rupak Ganguly

Installing Rails plugins from Github on Windows

Well, I have installed several Rails plugins but I was bummed when I tried to install the re-captcha plugin from Github. The command belwo just fails silently and creates an empty folder “recaptcha” under vendor/plugins:

ruby script/plugin install git://github.com/ambethia/recaptcha.git

Well, after a little googling, I found out here that using a http moniker instead of the git moniker would solve the issue like so:

ruby script/plugin install http://github.com/ambethia/recaptcha.git

Well, no  luck. Same empty folder. So, now reading the comment from Tom in the above article, I found out that what really works is the adding a trailing slash at the end of the above command like so:

ruby script/plugin install http://github.com/ambethia/recaptcha.git/

Bliss at last. The plugin directory has files now. Hope you did not have to spend too much time searching for this…

Update (02/22/2010):

I have noticed (so have many other users) that somewhere around Feb. 2010, the above method of installing the plugins do not work. I am investigating the issue with respect to different rails / ruby versions. I have tried with Rails 2.3.2, 2.3.5/Ruby 1.8.6, 1.8.7 and I have the issue. I will post an update if I find a solution. Till then, just download the zip file from Github downloads and copy it to your vendor/plugins folder. You can try cloning the github repo for the plugin as well if you choose to do so.

If you are using Ruby 1.9, try to see if the following fix resolves the issue:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2018


May 9 / Rupak Ganguly

Create a single page web application using SproutCore – Part I

There has been such an uproar of web frameworks nowadays. It has challenged the minds and spurred creativity. Such a framework is SproutCore – an MVC web app framework for developing apps in JavaScript that run inside a web browser. Go on and read about it on the SproutCore Wiki.

So, why did I get excited about a JS-based web framework? Well, one it is a web framework and I am in the business of building web applications. Secondly, the creation of a SproutCore application has a feel of creating Rails applications. You will see what I mean in a minute.

read more…


May 8 / Rupak Ganguly

Rails Magazine releases RailsConf 2009 Special Edition

Special Edition – RailsConf 2009 Report!

Special Edition – RailsConf 2009 Report! This concise issue of Rails Magazine covers RailsConf 2009 – in-depth commentary, photography, pointers to related resources and an interview section.

If you did not attend RailsConf, this is one of the best ways to get up to speed on the conference, what’s planned for Rails 3 and related information.

For those who attended, this should provide a good recap and insights by presenting different perspectives.

As usual, we will provide this issue as a free pdf download in maximum two weeks. The print edition is already available and can be purchased through MagCloud for $3.

Please check back our site for our next regular edition – coming soon!

Buy print edition

Table of Contents

A Word From the Editor by Olimpiu Metiu

RailsConf 2009 Roundup – Have it your way… by Casper Fabricius

Resources by Khaled al Habache

The Unofficial Guide to What’s New in Rails 3 by Rupak Ganguly

Interview with Ben Johnson by Ben Johnson and Bob Martens

Artwork by Duncan Davidson


Apr 30 / Rupak Ganguly

Error: ! [rejected] master -> master (non-fast forward)

Are you getting this error while you trying to push some changes to your Git branch? Jon Smirl has a neat explanation at KernalTrap.org. The excerpt from his entry is:

A "non-fast forward" means that you had this history earlier:

         o---o---A
        /
    ---o

pushed "A" to the remote's 'master', then built this history:

         o---o---A
        /
    ---o---o---o---o---A'

by rewinding and rebuilding, and the tip of the branch now
points at A', which you tried to push to the remote.

Which often causes troubles for people who are fetching from the
branch you are pushing into, and forbidden by default as a
safety measure.

As long as the people who fetch from the branch knows that you
will regularly rewinding the tip of the branch, there is no
confusion, and you can "force" a non-fast forward update.  There
are two independent safety mechanisms:

 - the sending end safety can be overriden by "git push --force"
   and/or by using a refspec prefixed with a '+');

 - the receiving end safety can be overriden by the config
   variable receive.denynonfastworwards of the repository you
   are pushing into.

The latter defaults to "unsafe", but if the safety is activated
in the repository, forcing from the sending side will not
deactivate it.  IOW, both ends need to agree to allow the unsafe
behaviour.

Read the full entry at http://kerneltrap.org/mailarchive/git/2007/11/18/425729