Tuesday, October 1, 2013

A Gem for generating Custom error pages in Rails Application

Writing a Ruby Gem was my long time wish, but i couldn't find an idea to make a gem. Finally got it, for which i didn't find a gem, a generator which will automatically generate a custom code for handling 404 and 500 errors and pages in rails application (Thanks to Sreekanth for noting there is no  gem for this taks). Here it is 
         
       rails_error_pages 1.0.5


installgem install rails_error_pages
installgem install rails_error_pages
How to use :

Simply add it to your Gemfile  and bundle install .

gem 'rails_error_pages'
 Next step is to use a generator, to add auto generated code into our application  using 

rails g rails_error_pages

That's it!  run your application and try with a false URL.

No comments:

Post a Comment