Monday, August 10, 2009

Sound card problem with ubuntu on HP mini?

there is no direct solution to fix this,
than following this lengthy procedure

it painful, but it worked for me...

Thursday, August 6, 2009

Got uninitialized constant with cucumber? like the following

uninitialized constant Admin (NameError)
./app/controllers/admin/posts_controller.rb:1
c:/Software/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
c:/Software/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
c:/Software/Ruby/lib/ruby/gems/1.8/gems/polyglot-0.2.6/lib/polyglot.rb:55:in `require'
c:/Software/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.94/bin/../lib/cucumber/cli/main.rb:118:in `require_fil
c:/Software/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.94/bin/../lib/cucumber/cli/main.rb:127:in `each_lib'
c:/Software/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.94/bin/../lib/cucumber/cli/main.rb:125:in `each'
c:/Software/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.94/bin/../lib/cucumber/cli/main.rb:125:in `each_lib'
c:/Software/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.94/bin/../lib/cucumber/cli/main.rb:118:in `require_fil
c:/Software/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.94/bin/../lib/cucumber/cli/main.rb:54:in `execute!'
c:/Software/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.94/bin/../lib/cucumber/cli/main.rb:28:in `execute'
c:/Software/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.94/bin/cucumber:9
c:/Software/Ruby/bin/cucumber:19:in `load'
c:/Software/Ruby/bin/cucumber:19

this is due to rspec features are refered instead of cucumber, to fix this run the following to create cucumber realted files

script/generate cucumber

now you can run

cucumber .







Wednesday, August 5, 2009

Getting 'Captcha image did not match with text' with simple_captcha always?
and if you are using restful_authentication then add the :captcha and :captcha_key to :user_accessible

attr_accessible :login, :email, :password, :password_confirmation, :captcha, :captcha_key

Sunday, August 2, 2009

Captcha Plugins for Rails

you have tow option to install captcha
for spam control

1) recaptcha plugin
this is use the http://recaptcha.net/ service get catcha image,
http://github.com/ambethia/c/tree/master

also its a great way to help translate scaned old books

2) simple captcha plugin
http://expressica.com/simple_captcha/

this is uses RMagick lib to generate catcha image

Installing RMagick on Windows/Debian/Ubuntu