Tag Archives: web development

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

Refinery Hosting on Heroku

Prerequisites 1) The Ruby language version 1.9.3 or higher 2) A working installation of ImageMagick 1) create a gemset using RVM rvm use –create ruby-1.9.3@refinery 2)Installing Refinery gem install refinerycms 3) Creating a Refinery application refinerycms mycms 4) Starting up … Continue reading

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

Custom rake task

Task to add Indian states to spree database. 1) Add a text file with extension .rake to the folder lib/tasks/ example:-lib/tasks/mytask.rake 2) add file content as follows task :add_indian_states=>:environment do CSV.foreach(“lib/tasks/states.csv”) do | row | state, abbr = row Spree::State.create(:name … Continue reading

Posted in rails, ruby on rails, web development | Tagged , , , , , | 5 Comments

Rails API

1) follow  railcast no:-348 In /public/index.html file use function addTask as the following way instead of described function addTask(ta) { $(‘#tasks’).append(‘<li>’ + ta.task.name + ‘</ul>’); } Reference 1) http://railscasts.com/episodes/348-the-rails-api-gem?view=asciicast 2) https://github.com/rails-api/rails-api 3) http://davidsulc.com/blog/2011/04/10/implementing-a-public-api-in-rails-3/   Securing a API  ( but not … Continue reading

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

AngularJS with Rails

1) Check the following URL for installation http://blog.ricodigo.com/blog/2012/10/14/announcing-the-release-of-angularjs-scaffold/ 2) for basics and for advance coding refer the following URL http://angularjs.org/ 3) for Installing/coding jasmine 1) https://github.com/pivotal/jasmine/wiki/A-Ruby-project-%28with-or-without-Rails%29 2) http://railscasts.com/episodes/261-testing-javascript-with-jasmine   http://www.klairvoyant.in

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

what is rails templates ?

generators can be used inside an application, they can also be used to generate applications too, This kind of generator is referred as a “template”. example gem(“rspec-rails”, :group => “test”) gem(“cucumber-rails”, :group => “test”) if yes?(“Would you like to install … Continue reading

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

How to create a Gem file

1) bundle gem gemwork1 (My IDE has option for “Gem Application” and given the name “gemwork1” as the application name) 2) in ‘lib/gemwork1.rb’ add the functionality code example add the following code to already existing module “Gemwork1”. here we adding … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , , | Leave a 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

linkedIn in Rails

Source 1) https://github.com/pengwynn/linkedin 2) http://pivotallabs.com/users/will/blog/articles/1096-linkedin-gem-for-a-web-app 3) https://developer.linkedin.com/documents/profile-fields#fullprofile in callback mention fields as the follows @profile= client.profile(:fields => %w(first_name last_name headline public_profile_url)) instead of @profile = client.profile   http://www.klairvoyant.in

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

Devise and OmniAuth :- solutions

solutions for problems faced while implementing railcast Devise and OmniAuth (revised) #235 1) avoid the bracket and ENV in “/config/initializiers/devise.rb” file use config.omniauth :twitter, “TWITTER_CONSUMER_KEY”, “TWITTER_CONSUMER_SECRET” instead of config.omniauth :twitter, ENV[“TWITTER_CONSUMER_KEY”], ENV[“TWITTER_CONSUMER_SECRET”] 2) callback locations  are different since java script domains … Continue reading

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