Mongrel Clustering with Rails

Hey every one wants to make their site run faster..and there are many ways like caching (page caching, fragment caching, method caching) so on. One other way is using mongrel cluster which will run multiple instance of mongrel on you server which will help to improve website speed to a huge extent.

Let me tell you the steps for doing mongrel clustering .. its really easy..

Step 1 : – Install mongrel cluster gem

sudo gem install mongrel_cluster

Step 2 : – configure cluster and run the config file which will reside in config/mongrel_cluster.yml

mongrel_rails cluster::configure -p 8000 -e production -a 127.0.0.1

Well thats it now here you go

Start the cluster:mongrel_rails cluster::start

Restart the cluster:mongrel_rails cluster::restart

Stop the cluster:

mongrel_rails cluster::stop


Well just try these steps and if you are not able to configure it just post acomment and i will get back to you.

Enjoy better speed :)
Be Sociable, Share!

Tough times ahead – ITs WORLD RECESSION

Every where people are just talking about recession in US economy . Where ever on what ever sites you go people are just posting negative comments about companies which used to be favorites just few months back

The buzz words are seeing a slow down. Some of the examples that I came across on some of the articles I read

1) iPod dying? It’s already dead

2)11 troubled Web companies: The next Kozmos? where people are talking about twitter, skype and other big names which were used to be widely used all over are now getting some cause of worry

3)Open-source innovation in a recession

4) Week in review: Tech stocks tumble
tech stocks falling like a pack of cards every where there is a slow down no matter which country you see.

5) Chip forecasts head south

6) Micron to cut workforce by 15 percent, slash flash output

7) The tech downturn: How long and how bad?

While dollar appreciating was a bit of a support for some of the IT biggies, but on the other hand default payments is affecting the revenues. They are forced to reduce number of employees

companies are not getting big contracts like before. People have reduced spendings.

So everyone is just waiting and watching WHAT WILL HAPPEN NEXT ? No one knows actually.. Lets see wats the road ahead especially for IT companies

Be Sociable, Share!

Page Screenshot in Rails

Have you ever been through a situation where you need to embed a Flash object or some other element in a pdf file which cant be done directly? There is gr8 solution for it

with the help or combination of RMagick + Image Magick + win32Screenshot gem you can take the screenshot of the desktop or webpage and generate an image from it and eventually embed it in your pdf file

Here is the code for it

require 'win32screenshot'
require 'RMagick'
def screenCapture
  width, height, bitmap = Win32::Screenshot.desktop
  img_lst = ImageList.new
  img_lst.from_blob(bitmap)
  img_lst.write('public/screen.png')
 true
end

If you are stuck any where just write to me or post a comment hereI would be pleased to solve your error
Be Sociable, Share!

Improve your productivity using firefox extensions – Top 10 addons

Hi all

If you are into web development here are some of the tools you must make use of to improve the productivity.

  1. FireBugEdit, debug, and monitor CSS, HTML, and JavaScript live in any web page.
  2. Web Developer Toolbar – Adds a menu and a toolbar with various web developer tools. I used this add-on for a long time prior to Firefox 2.0. I found its pixel measuring tool to be useful and back when I did table design I used its outlining/bordering tool to help me adjust that flow-based layouts. I’ll have to relearn how to use this sucker for the new methodologies I use for client-end design.
  3. Seoquake – Seoquake is one of the most powerful tools available for analyzing your website’s Search Engine Optimization results. It will help you determine what your Google PageRank score is, how many pages on your site are indexed, how many external sites link to yours, similar statistics for Yahoo and Live.com, your Alexa ranking, your del.icio.us vote count (for specific pages), and mountains of other data. I’m still finding out more and more about this tool, but I think this is by far and large one of the most powerful extensions available to web developers.
  4. ColorZilla – Have you ever seen a really interesting color on a website and try to find out what it is? ColorZilla gives you the ability to simple use a “color picker” to mouse over the desired color and capture it’s hex value. This extension has proved to a real time saver and I’ve used it longer than any of the other extensions or plug-ins on this list (since late 2004).
  5. Alexa Sparky – Another traffic analysis tool, brought to you by Alexa, Amazon.com’s traffic ranking service. I like this plugin simply because of the trend graph that it places in the bottom right corner of your browser window, but it also has some helpful features, such as determining what sites are similar to yours.
  6. Session Manager – I keep many tabs open on my Firefox sessions at all times, and if my computer has to restart or if something crashes I can lose potentially valuable information if I am unable to find those pages again. Session manager automatically saves your sessions and in the event of a crash or a reboot it can restore all of the tabs in the session for you.
  7. IE View Lite – There are a lot of developers out there who wish Internet Explorer would either accept the W3C standards or just go away, but unfortunately a large portion of Internet users are Internet Explorer users. IE View Lite allows you to right click on any given page and gives you the option to view this page in a new Internet Explorer window. IE View Lite is a powerful tool for cross-browser testing and validation. I prefer using IE View over IE Tab, which runs Internet Explorer within a tab in Firefox, simply because IE tab has some quirks (i.e. it reverts back to Firefox if you press Firefox’s reload button while focused on an IE Tab) and you don’t get full access to all of IE’s options with IE Tab.
  8. FireFTP – FireFTP is simply an FTP client built into the Firefox browser. It’s free, it’s simple, it’s reliable, and I can flip to FireFTP just like any other tab on the browser.
  9. Greasemonkey – Greasemonkey is arguably the most powerful Firefox extension. Greasemonkey allows you to apply custom JavaScripts to pages within your browser; for instance there are scripts to declutter your Facebook homepage, hide Gmail lables, and hide Netflix reviews. I use Greasemonkey to make it easier to navigate social network sites when promoting my blog. You can view the directory of Greasemonkey scripts at Userscripts.org.
  10. Download Status Bar – When I download WordPress plug-ins for my blog, I usually do so in intervals of 3-5 plug-ins at a time. I use Download status bar to give me instant access to my completed downloads without having to hunt them down using Windows Explorer. I try to save time in every way possible.
  11. StumbleUpon – While I don’t believe in spamming social tagging sites in everyway possible, I always make sure I am the first to submit my own articles to StumbleUpon. Why? Because the first StumbleUpon review is crucial to getting the correct demographic to view your site, since the categorization of the “stumble” occurs during the first review instance. It’s better that you, the author of the site, write the first review and categorize it accordingly, rather than put it in the hands of someone who may be viewing your site for the first time. In addition StumbleUpon sends more users to your site on average than Digg does, according to ProBlogger.
  12. Extended Cookie Manager and Cache Status – I use the Extended Cookie Manager and the Extended Cache Manager to help me debug my site when I’m running into connectivity issues, such as the trouble I ran into with my MySQL connection bombing out in IIS.
Be Sociable, Share!

Flex On rails

Hi all

With the increasing number of sites being made in RIA – Rich Internet Applications many people have adopted Rails + Flex for make a Rich Internet Application.

There is a very gr8 plugin or code available on code.google.com known as ruby on rails ria sdk by adobe. Here is the url for it

http://code.google.com/p/rubyonrails-ria-sdk-by-adobe/

The Ruby on Rails RIA SDK by Adobe provides developers with samples and code to help develop solutions with Ruby and Adobe technologies. The SDK includes open source code created by third parties as well as samples and demos that have been created by project members.

You can download an initial .zip file containing all the files using the Download link on the right hand side, or you can check out the code via SVN by clicking on the ‘Source’ tab on the top of the page.

This will help you to get things going and working with Rails + Adobe technology.

Hope this helps

Thanks

Dhaval Parikh
Software Engineer
Ruby on Rails
http://www.dhavalparikh.co.in

Be Sociable, Share!

Latest RoR plugins

Hi all

I am creating this post for all those who wants to get updated regarding whats demanding in RoR and which are the new plugins which will eventually make their coding easier and faster…

So as and when i will come across such link or sites or plugins I will be updating so keep visiting this page…

Also I might have implemented these plugins and would be tested..so if you have any problem in implementing them do write a mail to me.

1) Dynamic Tags with RoR :- Tagging for faster search

http://agilewebdevelopment.com/plugins/dynamically_tags and http://blog.jasoncrystal.com/2008/08/17/rails-plugin-dynamically_tags/

2) Open id integration with Rails :- A plugin that makes openid super simple.

http://github.com/madnificent/openid_enabled/wikis

3) Google Sitemap :- A google sitemap plugin for rails websites. It generates dynamic sitemaps based on your models and named routes. It has a full mvc stack that you can configure.
http://agilewebdevelopment.com/plugins/sitemap
http://gethandcrafted.com/

4) attachment_fu_app_engine : – Extension for AttachmentFu (http://github.com/technoweenie/attachment_fu) which uses the Google App Engine for storage and image resizing. Allows you to add or change thumbnail sizes without migrating previous data and removes the need to install ImageMagick.

Here are few new additions which I found useful have a look @ them

1) RQuote :- Gets realtime stock quotes from Yahoo Finance.

http://github.com/johnyerhot/rquote/tree/master download and njoi very easy to implement

2) Mobile_fu :- If Want to automatically detect mobile devices that access your Rails application? Mobile Fu allows you to do just that. People can access your site from a Palm, Blackberry, iPhone, Nokia, etc. and it will automatically adjust the format of the request from :html to :mobile.

script/plugin install git://github.com/brendanlim/mobile-fu.git

3) Act As nice url :- This acts_as extension provides the
capabilities for creating a nice url based on an attribute of the current object.
You can set / unset the object id in front of the URL and choose the object
attribute to use to generate the URL.
more to go.. Even you can post good plugins which are new by commenting on this post

Thanks

Dhaval Parikh
Software Engineer
Ruby on Rails
http://dhavalparikh.co.in

Be Sociable, Share!
1 7 8 9 10 11 27