Klairvoyant infosolution's Blog

CSS Buttons


1) in css file

.button, .button:visited{
background: #222 url(overlay.png) repeat-x;
display: inline-block;
padding: 5px 10px 6px;
color: #fff;
text-decoration: none;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.6);
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.6);
text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
border-bottom: 1px solid rgba(0,0,0,0.25);
position: relative;
cursor: pointer
.small.button, .small.button:visited{ font-size: 11px}
.button, .button:visited,.medium.button, .medium.button:visited
font-size: 13px;
font-weight: bold;
line-height: 1;
text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
.large.button, .large.button:visited
font-size: 14px;
padding: 8px 14px 9px;
.super.button, .super.button:visited
font-size: 34px;
padding: 8px 14px 9px;
.pink.button, .pink.button:visited{ background-color: #6b32b2; }
.pink.button:hover{ background-color: #44177c; }

<a class=”super button pink”>Pink Button</a>
<a class=”large button...

Read more

paypal sandbox error:- This transaction cannot be processed due to an invalid merchant configuration.



while creating test merchant account select account type as “Website Payments Pro” instead of “seller”

Read more

Forms in rails, different ways


1) Method 1

a) input.html.erb

<form action=”/look/at”>
<input type=”text” name=’text1′>
<input type=”checkbox” name=”checkbox1″>
<input type=”radio” name=”radio1″ value=”red”>Red
<input type=”radio” name=”radio1″ value=”green”>Green
<input type=”radio” name=”radio1″ value=”blue”>Blue
<select name=”select1″>
<option value=’green’/> Green
<option value=’Blue’/> Blue
<option value=’Red’/> Red
<option value=’Orange’/> Orange
<select name=”select2[]” multiple size=”3″>
<option value=’AC’/> AC
<option value=’Music system’/> Music Syatem
<option value=’Heater’/> Heater
<option value=’auto...

Read more

Paypal with rails-Using Active merchant


) gem install activemerchant

2) create two paypal test accounts 1)Business 2) personal

copy the following information which will be created while creating business account

API Username,API Password and Signature

location:- https://developer.paypal.com/

3) code the following in a ruby file ex “purchase.rb”

require “rubygems”
require “active_merchant”


:login=> “API username”,
:password=>”API Password”,
# here the credit card information of the personal test account

:last_name=>”M V”
if credit_card.valid?

Read more

Open Source Ruby On Rails Applications

Read more

IDE for rails

Read more

mentioning version and database for rails new project


rails _3.0.8_ new myproject -d mysql

where  -d for mentioning what database we use

Read more

How to get data from heroku to your system


1) Install the latest heroku gem
2) Install taps gem

3) execute the command heroku db:pull

for more
1) http://devcenter.heroku.com/articles/taps


Read more

ERROR: Could not find a valid gem ‘1.2.3.’ (>= 0) in any repository


Install  as the following form

gem install rack –version=1.2.3.

where rack is the gem we want to install


Read more

activated rack ..., but your Gemfile requires rack ..... Consider using bundle exec. (Gem::LoadError)


When it says try using bundle exec… it means that you have to prefix the command with that

Example if  “cucumber features” display the error

“bundle exec cucumber features”


Read more

RVM use


RVM make installing multiple ruby interpreters / runtimes easy and consistent, it provides features such as gemsets that aren’t typically supported out of the box on most ruby installs.

Read more

include and require in rails



The require keyword includes files in your include path (e.g., lib, your Ruby load path, and so on).


The include keyword mixes modules into classes, so it needs to be inside a class to be used.

Read more

passing variables to the partial in rails


There is a bit of magic involved in passing variables to the partial. Because the partial is named “person,” the main template will look for an instance variable @person, and pass it to the partial as a local variable, person. What if the instance variable doesn’t match the name of the partial? Then you’d explicitly pass it, like this: “person”, :locals => { :person => @scott } %>All the key/value pairs in the :locals hash will be made into local variables for the partial.

Read more

Rails Tools


cucumber- behavior driven development in rails

BDD focuses on obtaining a clear understanding of desired software behavior through discussion with stakeholders. It extends TDD by writing test cases in a natural language that non-programmers can read. Behavior-driven developers use their native language in combination with the ubiquitous language of domain driven design to describe the purpose and benefit of their code. This allows the developers to focus on why the code should be created, rather than the technical details, and minimizes translation between the technical language in which the code is written and the domain language spoken by the business, users, stakeholders, project management, etc.

HAML to HTML converter


HTML to HAML converter


CSS to SASS Converter


JavaScript to CoffeeScript Converter




Anemone is a free, multi-threaded Ruby...

Read more

What is Heroku ?


Heroku is a multi-tenant platform and hosting environment. Your app doesn’t need its own servers, slices, or clusters, and you’ll benefit from continuous platform improvements.

For Implementation go to


Read more