Dynamic Report In Ruby On Rails

In my recent work i have face some difficulties for generating different report for different organization or client using same application,because every client have their own reporting format. Like SAAS based application if it is generate some MIS report and if client require some more or less information depending upon his requirement we can give some editable facilities to edit and generate report. So to fulfill this kind of requirement user editable report which contains Markup + ruby code for

Continue Reading

Rchart Charts And Graphs For Ruby

Rchart is ruby port of the slick pChart charting library. Using Rchart we can develop various format of chart. Line Chart Cubic Curve Chart Bar Chart Pie Chart Filled Line Chart Stacked Bar Chart And many more ,You can checkout examples of rchart.Some of examples are listed below. Rchart gem require ruby-gd gem and GD library. To install rchart gem on ubuntu following packages needed. sudo apt-get install libgd-ruby sudo apt-get install libpng-dev sudo apt-get install libgd2-xpm-dev sudo gem install

Continue Reading

Amazon Simple Queing Service (SQS) + Ruby

Amazon Simple Queue Service (Amazon SQS) is a distributed queue messaging service. The idea of SQS is to remove the direct associations between producer and consumer and act as mediator between them. e.g Consider that you have a large  application like websites monitoring which involve many stages like Downloading a website Processing the downloaded website Generating report of the above processing So instead of clubbing the above three one can just split them on their specific need(based on the work

Continue Reading

Convert open office document to another open office format

In many application we want to convert one office format to another office format e.g doc to PDF , doc to html etc.We can import/export document using OpenOffice easily,but this is manual way.But standalone/Web based application we have to automate this functionality. JODConverter,the Java OpenDocument Converter, It converts documents between different office formats using OpenOffice. JODConverter supports all conversion which is given by OpenOffice.More Info regarding format you can visit here. Now,JODConverter is a java library so it can be

Continue Reading

Nailgun using ruby

In previous article we have seen that how to start nailgun server,and use of nailgun in shortly. Now in this article how to use nailgun using ruby application which directly/indirectly use java library or java application. You can start with nailgun manually as shown previous article and configure ng as per need.Or you can install nailgun plugin from github.

Continue Reading

Running Javascript under Celerity[HTMLUNIT]

Lately there have been too many people wanting to know how to execute Javascript in Celerity. Let me show you how it done. First a quick note on JRuby installation. Here are few useful links to install JRuby under 1. Linux(ubuntu) should work for other linux packages as well. 2. Windows. Just to confirm,kindly type jruby -v on terminal or cmd depending on OS you are using and you should get the version of jruby you are running. Mine output

Continue Reading

Generate Bookmark for PDF using act_as_flying_saucer

In previous article we have seen that how pdf is generated  using act_as_flying_saucer plugin. Following code snippets is used for generating pdf with bookmark . <bookmark name=”section 1″  href=”#section_1″> tag is used to generate bookmark. which contains name attribute for displaying name of bookmark. href attribute is used for navigation purpose. <bookmark> tag can be nested so it can be used for generating nested bookmark <bookmark> tag is wrapper with <bookmarks> tag. This tag placed in html header. Now in

Continue Reading

Password protected pdf in rails using act_as_flying_saucer

Pdf with password protected in rails In previous article we have seen that how pdf is generated  using act_as_flying_saucer plugin. Now  act_flying_saucer  has added support for  password protected pdf. To generate PDF with password protection just pass :password=>”xxx” to render_pdf method. You can install act_as_flying_saucer plugin For  further details you can visit article or visit http://github.com/amardaxini/act_as_flying_saucer

Continue Reading

Vertical table in rails

In this article i have just taken a short example describing vertical table,and its implementation using rails. When table has no fixed column it has dynamic fields .data is not stored on separate column but data stores in vertical fashion. For implementing vertical table table has mainly 2 columns key and value pair.key is like database column name and value contains actual data. Lets take an e.g Consider website in which it contains various products and its comparison ,searching and

Continue Reading

Static pages in rails

Static site using rails As we know rails is mainly used for dynamic website.we can also display static web pages or we can deploy full static website using rails. The following code can help us to display static pages. Step 1:-Create Rails project Step 2:-Generate StaticPage Controller Step 3:- Create StaticPage Class in Model Step 4:- Add following line in routes.rb Here we are passing filename as parameter which is static file name. This will generate url as http://sitename/page/static_filename.html Step

Continue Reading

Site Footer