Tag Archives: ruby on rails

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

configure S3 in spree, Heroku

1) add gem ‘aws-sdk’ and then bundle install. add to spree.rb located at config/intializers/spree.rb. you don’t want to change anything in this code attachment_config = { s3_credentials: { access_key_id: ENV[‘AWS_ACCESS_KEY_ID’], secret_access_key: ENV[‘AWS_SECRET_ACCESS_KEY’], bucket: ENV[‘S3_BUCKET_NAME’] }, storage: :s3, s3_headers: { “Cache-Control” … Continue reading

Posted in ecommerce, web development | Tagged , , , , , , | Leave a comment

Bootstrap 3 with Rails 4

Refer the blog http://www.erikminkel.com/2013/09/01/twitter-bootstrap-3-in-a-rails-4-application/ In the downloaded bootstrap archive you will see a ‘dist’ folder which will house the css, javascripts, and fonts folders we will want to copy to our Rails application vendor/assets/ directory. bootstrap/dist/css/bootstrap.css and bootstrap/dist/css/bootstrap.min.css to vendor/assets/stylesheets … Continue reading

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

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

spree tools and tutorials

1) deface http://guides.spreecommerce.com/view_customization.html http://deface.heroku.com/ https://github.com/spree/deface http://blog.endpoint.com/2010/01/rails-ecommerce-spree-hooks-tutorial.html 2)Theams 1) https://github.com/spree/spree_fancy https://github.com/search?langOverride=&p=5&q=spree+theme&repo=&start_value=1&type=Repositories 3) Gem http://guides.rubygems.org/specification-reference/#licenses=http://docs.rubygems.org/read/chapter/20 http://www.klairvoyant.in

Posted in 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

to_label function use

class Objective < ActiveRecord::Base …. belongs_to :interest_area …. end in objectives/form <%= f.association :interest_area %> 1) add to_label function to class InterestArea class InterestArea < ActiveRecord::Base attr_accessible :interest has_one : objective def to_label “#{interest}” end end Simple Form by default … Continue reading

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