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. …
Blog Posts
There are various ways to improve “java” performance.One of the way is use of Nailgun. Nailgun is a client, protocol, and server for running Java programs from the command line without incurring the JVM startup overhead. Programs run in the server (which is implemented in Java), and are triggered by the client (written in C), which handles all I/O. It means when java is called every time JVM is loaded so execution time of any application increases due to JVM …
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 …
Everyone is familiar with routes in rails been a Rails developer we add and edit config/routes.rb many time throughout our application.But let get it straight how many of us actually write test for routes that we define.I guess hardly anyone does I too used to avoid writing it until I found out how easy and fun it is to write route test. So let me show you A Routes Test has basically 3 parts 1. assert_generate 2. assert_recognizes 3. assert_routing …
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 …
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 …
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 …
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 …
Today, I have started testing Beta release of Rails 3.0.By Default Rails 3.0 start with webrick.To start with mongrel do following steps. 1)Install mongrel gem 2) After installing mongrel gem go to config/boot.rb file and add following line 3) Start server as rails server …
Rails Pdf Plugin act_as_flying_saucer There are various ways to generate pdf documents in any language.In Rails we can use prawn library ,HtmlDoc,PrinceXml and many other library,using their api we can generate pdf document.Basically the primary goal is converting HTML web pages to PDF Document,without much changing existing CSS and HTML. Using the Flying Saucer Project we can achieve this.we can convert HTML + CSS to PDF documents without much changing HTML and CSS. It also support CSS 2 and many …