Tag Archives: ror

community engine, S3, Heroku

1) clone the source code from https://github.com/bborn/ce-heroku 2) build and deploye to heroku 3) add addon sendgrid to your application 4)made necessary changes in application_config.rb example :app_host => ‘your hostname’, :community_name => “your community name”, :s3_credentials => { :access_key_id => … Continue reading

Posted in ruby on rails | Tagged , , , , , , | Leave a comment

heroku add second email

create new public/private key for new email as follows 1) ssh-keygen -t rsa -C “mvjohn@klairvoynat.com” 2) provide new file name in which to save the key (/home/.ssh/seckey) 3) Then add your new key to the ssh-agent:- ssh-add ~/.ssh/seckey 4) Then … Continue reading

Posted in ROR, Ruby, ruby on rails, web development | Tagged , | Leave a comment

RSpec – doubles stub and mock

doubles when we depend on components with nondeterministic characteristics, we may find that files get corrupted, disk fail, networks time out, and servers go down in the middle of running specs. because these are things that we have no control … Continue reading

Posted in rails, ROR, ruby on rails, testing, web development | Tagged , , , , , | Leave a comment

Heroku application- increase performance – Tips and Tools

1) use unicorn 2) Using Amazon CloudFront CDN with Rails 3) enable gzip compression 4) Use the following browser plugins to check performance issues a) FireBug b) page speed insights 5) Optimize Images for the Web ( http://luci.criosweb.ro/riot/ ) it’s … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , , | 1 Comment

spree with Heroku and Amazon S3

A) spree installation  1) add in gem file and bundle install gem ‘spree’ gem ‘spree_auth_devise’ gem ‘spree_gateway’, :git => ‘git://github.com/spree/spree_gateway.git’, :branch => “1-3-stable” 2) rails g spree:install 3) bundle exec rake spree_auth:install:migrations 4) bundle exec rake db:migrate 5)change the following line … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , , , , , , | 1 Comment

simple form – f.collection_radio_buttons Implementation sample code

<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> …….. <%= f.collection_radio_buttons( :role, [[‘1’, ‘Student’],[‘2′,’Alumni’],[‘3′,’HR’],[‘4′,’Recruiter’]], :first, :last,:checked=> ‘1’, :collection_wrapper_tag=>’label’,:collection_wrapper_class=>’bigSize’ ) do |b| b.label(:class => ‘my_class’) { b.radio_button + ” ” + b.text.html_safe } end %> ……….. <% end … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , , | Leave a comment

Rails Migration file creation :- short way

If the migration name is of the form “AddXXXToYYY” or “RemoveXXXFromYYY” and is followed by a list of column names and types then a migration containing the appropriate add_column and remove_column statements will be created. Example $ rails generate migration … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , | Leave a comment

simple form with Twitter Bootstrap support

1) add to gem file and bundle gem ‘simple_form’ 2) for Twitter Bootstrap support rails generate simple_form:install –bootstrap else rails generate simple_form:install 3) for “country select” support add gem ‘country_select’   other instructions 1) Be sure to have a copy … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , | Leave a comment

Error :- already activated rake 0.9.3.beta.1, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this.

Solution:- gem uninstall rake -v 0.9.3.beta.1   http://www.klairvoyant.in

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , | Leave a comment

Phusion – passenger

This is just to mention the second time also failed to install it in to my Debian system. more over the modifications made for the installation made adverse effect on proper working of my machine http://www.klairvoyant.in

Posted in rails, ROR, ruby on rails, web development | Tagged , , | Leave a comment