Skip to main content

Harjeet Singh's Library tagged rails   View Popular

08 Dec 09

Heroku | Welcome! Tips

"Welcome to Heroku!

Hi harjeetss@gmail.com. You don't currently have any apps deployed on Heroku. This guide will get up and running in no time.
Install the Heroku gem:

sudo gem install heroku

Create a new git repository for your app (if you haven't already):

cd myapp
git init && git add . && git commit -m "first commit"

More on using Git with Heroku. →
Create a new Heroku app:

heroku create
Created http://sharp-autumn-42.com/ | git@heroku.com:sharp-autumn-42.git
Git remote heroku added

NOTE: The app's name is generated automatically; don't worry, you can rename it at any time.
Deploy your code:

git push heroku master

Run migrations (or other bootstrap tasks):

heroku rake db:migrate

Open the deployed app in your browser:

heroku open

Refresh this page to view app information and manage settings."

heroku.com/myapps - Preview

heroku rails getting_started tips

  • Welcome to Heroku!




    Hi harjeetss@gmail.com. You don't currently have
    any apps deployed on Heroku. This guide will get up and running
    in no time.



    Install the Heroku gem:


    sudo gem install heroku


    Create a new git repository for your app (if you haven't already):


    cd myapp
    git init && git add . && git commit -m "first commit"

    More on using Git with Heroku. →



    Create a new Heroku app:


    heroku create
    Created http://sharp-autumn-42.com/ | git@heroku.com:sharp-autumn-42.git
    Git remote heroku added


    NOTE: The app's name is generated automatically; don't worry,
    you can rename it
    at any time.



    Deploy your code:


    git push heroku master


    Run migrations (or other bootstrap tasks):


    heroku rake db:migrate


    Open the deployed app in your browser:


    heroku open


    Refresh this page to view app information and manage settings.

27 Oct 09

Rails Engines

"The engines plugin enhances Rails plugins — allowing sharing of code, views and other aspects of your application in a clear and managed way."

rails-engines.org/ - Preview

rails plugins

21 Aug 09

Sending mail asynchronously in Rails using Workling

Sending mail asynchronously in Rails using Workling

If you want to send mail asynchronously in your rails app, but don’t want to bother with using a queue server like Starling, then have a go at this…

First, run this:

./script/plugin install git://github.com/purzelrakete/workling.git
./script/plugin install git://github.com/langalex/workling_mailer.git
./script/plugin install git://github.com/matthewrudy/rudeq.git
rake queue:setup
rake db:migrate

playtype.net/rudeq - Preview

async rudeq ruby rails workling

  • If you want to send mail asynchronously in your rails app, but don’t want to bother with using a queue server like Starling, then have a go at this…

    First, run this:

    ./script/plugin install git://github.com/purzelrakete/workling.git
    ./script/plugin install git://github.com/langalex/workling_mailer.git
    ./script/plugin install git://github.com/matthewrudy/rudeq.git
    rake queue:setup
    rake db:migrate

    now add this to your environment:

    Workling::Clients::MemcacheQueueClient.memcache_client_class = RudeQ::Client
    Workling::Remote.dispatcher = Workling::Remote::Runners::ClientRunner.new

    Finally, add this into the body of your mailer classes:

    include AsynchMail

    now start the workling client:

    ./script/workling_client start

    done!

Sending mail asynchronously in Rails using Workling

Sending mail asynchronously in Rails using Workling

If you want to send mail asynchronously in your rails app, but don’t want to bother with using a queue server like Starling, then have a go at this…

playtype.net/workling - Preview

async rudeq ruby rails workling starling rabbitmq

  • include AsynchMail

    now start the workling client:

    ./script/workling_client start
20 Aug 09

matthewrudy's rudeq at master - GitHub

Description: A rails DB-based queue plugin

github.com/...master - Preview

async rails ruby starling rudeq

  • RudeQ
    =============
    A simple DB based queue,
    designed for situations where a server based queue is unnecessary.

Simple AMQP Library for Ruby

    • AMQP model does have some nice benefits:



      • It is designed for highly scalable deployment scenarios, so it will give you room to grow without having to re-architect your software;
      • It defines a language-neutral wire format, so you can use it to integrate with other languages;
      • It incorporates a robust and generalized message routing infrastructure.

Starling: A Ruby Persistent Queue Server That Speaks Memcached

Starling: A Ruby Persistent Queue Server

RabbitMQ
RudeQ
Scaling
Beanstalkd

www.rubyinside.com/ersistent-ruby-queues-958.html - Preview

async ruby rails activemq starling

  • It's been around for a while now, but Starling is a "light-weight persistent queue server that speaks the MemCache protocol." Starling makes it ridiculously easy to set up a network-accessible queue (or many queues) for, say, asynchronous job processing between multiple processes and machines. It was developed by Twitter to handle the heavy amount of queueing necessary to keep their service ticking over.
  • FiveRuns have even created their own fork that, they say, is significantly faster.
  • 5 more annotations...
19 Aug 09

DZone Snippets: Store, sort and share source code, with tag goodness

DZone Snippets

17093 users tagging and storing useful source code snippets

snippets.dzone.com - Preview

dzone tools tips code-sample ruby perl rails

17 Aug 09

Getting Started with SOAP4R — Quick off the Mark

  • # Create Lyris Driver
    require "soap/wsdlDriver"
    wsdl = "http://lyris:82/?wsdl"
    driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
     
    # Add authentication
    user = "admin"
    pass = "xxxxx"
    driver.options["protocol.http.basic_auth"] << [wsdl,user,pass]

SOAP Lite Client, the Documentation » File: README

  • SYNOPSIS:


            require 'soap/lc'

    wsdl = "http://localhost:3000/simple/wsdl"
    s = SOAP::LC.new( ).wsdl( wsdl ).call( "HelloWorld", { :from => "Greg" } )
    r = s.result
    puts r.to_h

    # Or

    r = SOAP::LC["http://localhost:3000/wsdl"].HelloWorld( :from => "greg" ).result

13 Aug 09

ruote - index

Ruote is a workflow engine written in Ruby. It’s a runtime for long running [business] processes.

openwferu.rubyforge.org - Preview

ruby rails workflow engine

  • Ruote is a workflow engine written in Ruby. It’s a runtime for long running [business] processes.
  • There is a small quickstart available, it focuses on the ruote ‘gem’. For an example integration in Rails there is an online demo (though it’s still running an old version)




    Processes are explicitely defined and may be explicitely handled (start, pause, cancel, update).




    A process is started by handing a [business] process definition to the engine. A process definition is expressed in ruote’s own process definition language, which comes in two flavours : XML and a Ruby DSL.




    A process definition will describe the flow of work among participants.




    A ruote engine can handle simultaneously multiple process instances, created from one or more different process definitions. A process instance can be modified on the fly.

03 Aug 09

SIP Servlets - SIp vs Jain

JRuby/Rails Integration with Torquebox Telco Framework

www.mobicents.org/...index.html - Preview

jruby ruby rails tips voip jain sip telco

  • Mobicents Sip Servlets is compatible with the Torquebox Telco Framework JRuby on Rails integration. The framework allows you to create powerful, pure or converged VoIP JRuby on Rails applications.


    JRuby features a powerful and well deployed scripting language that allows you to modify your application at runtime (this is true even for the SIP and Media part that Mobicents Sip Servlets offer) without restarting the server. In addition, TorqueBox is a new kind of Ruby application platform that integrates popular technologies such as Ruby-on-Rails, while extending the footprint of Ruby applications to include support for Job Scheduling, Task Queues, SOAP Handling, and other capabilities.


    To obtain more information about building pure JRuby-Rails applications that leverage Mobicents SIP Servlets SIP and mediat capabilities, refer to the Torquebox User Documentation.


    Check this blog post to help you create your first pure Torquebox JRuby Telco application and our pure JRuby on Rails TorqueBox Telco example showcasing this integration.

  • Sip Servlets

    JAIN SLEE

    Application Architecture

    Based on HTTP Servlets. Unit of logic is the SIP Servlets

    Component based, Object Orientated architecture. Unit of logic is the Service Building Block

    Composition through Application Router

    Composition through parent-child relationship

    Application State

    Servlets are stateless

    SBBs may be stateful.

    Shared state stored in a session and visible to all Servlets with access to the session

    SBB state is transacted and a property of the SBB itself. Shared state may be stored in a separate ActivityContext via a type safe interface

    Concurrency Control

    Application managed : use of Java monitors

    System Managed : isolation of concurrent transactions

    Facilities (Utilities for Applications)

    Timer, Listeners

    Timer, Trace, Alarm, Statistics, Profiles.

    Protocol Support

    SIP and HTTP

    Protocol agnostic. Consistent event model, regardless of protocol/resource

    Availability Mechanisms

    Container managed state (session object) that can be replicated

    Container managed state (SBB CMP, Facility, ActivityContext) that can be replicated

    No transaction context for SIP message processing

    Transaction context for event delivery

    Non transacted state operations

    Container managed state operations are transacted

    Facilities are non transacted

    Facilities, timers, are transacted

    No defined failure model

    Well defined and understood failure model via transactions

    Management

    No standard management mechanisms defined

    JMX Interface for managing applications, life cycle, upgrades, ...

TorqueBox: Home

TorqueBox is a new kind of Ruby application platform that integrates popular technologies such as Ruby-on-Rails, while extending the footprint of Ruby applications to include support for Job Scheduling, Task Queues, SOAP Handling, and Telecom.

TorqueBox provides an all-in-one environment, built upon the latest, most powerful JBoss AS Java application server. Functionality such as clustering and cloud deployment is included right out-of-the-box.

torquebox.org - Preview

jruby ruby rails tips




  • TorqueBox is a new kind of Ruby application platform that integrates popular
    technologies such as Ruby-on-Rails, while extending the footprint of Ruby applications
    to include support for Job Scheduling, Task Queues, SOAP Handling, and Telecom.



    TorqueBox provides an all-in-one environment, built upon the latest, most powerful JBoss AS
    Java application server. Functionality such as clustering and cloud deployment is included
    right out-of-the-box.

31 Jul 09

Rails: disabling database access for rails app's

Add following line in environment.rb located in /config directory\nview plainprint?\n\n 1. config.frameworks -= [ :active_record ] \n\n \n config.frameworks -= [ :active_record ]\n \n\n\nThis line should come after following line\nview plainprint?\n\n 1. Rails::Initializer.run do |config| \n\n \n Rails::Initializer.run do |config|\n \n\n\n\n2. Comment all the lines starting with ActiveRecord::Base in /config/initializers/new_rails_defaults.rb

anuj-mehta.blogspot.com/...bling-database-access-for.html - Preview

tips rails ruby database disable

    • Add following line in environment.rb located in /config directory

      1. config.frameworks -= [ :active_record ]  
      2. Rails::Initializer.run do |config|  


      2. Comment all the lines starting with ActiveRecord::Base in /config/initializers/new_rails_defaults.rb
    • Add following line in environment.rb located in /config directory

      1. config.frameworks -= [ :active_record ]  
      2. Rails::Initializer.run do |config|  


      2. Comment all the lines starting with ActiveRecord::Base in /config/initializers/new_rails_defaults.rb

Using Rails without a database « log4p

Rails Recipes to the rescue. Recipe 14 ('Rails without a database') explains how to modify the helpers and environment configuration to get everything to work without a database and ActiveRecord. Kudos for pointing this out to Levi!!.

log4p.com/...using-rails-without-a-database - Preview

rails tips ruby database disable

  • Rails Recipes to the rescue. Recipe 14 ('Rails without a database') explains how to modify the helpers and environment configuration to get everything to work without a database and ActiveRecord. Kudos for pointing this out to Levi!!.

Deploying a Rails app without a database using Capistrano « matt.west.co.tt

Deploying a Rails app without a database using Capistrano

So you’ve got a simple-but-devastatingly-clever Rails app that doesn’t use a database, you’ve dutifully added the line to config/environment.rb to disable the ActiveRecord framework, and now you’re ready to unleash it to the world, using Capistrano for deployment. But when you run ‘cap deploy:cold’, it merrily tries to run database migrations and fails with “uninitialized constant ActiveRecord”. How do you make Capistrano behave?

A simple question, with a simple answer, but one which is curiously absent from the internet. Googlejuice ahoy!

Stick this at the bottom of config/deploy.rb:

namespace :deploy do
desc "Override deploy:cold to NOT run migrations - there's no database"
task :cold do
update
start
end
end

matt.west.co.tt/...capistrano-without-a-database - Preview

rails tips ruby database disable

  • Deploying a Rails app without a database using Capistrano




    So you’ve got a simple-but-devastatingly-clever Rails app that doesn’t use a database, you’ve dutifully added the line to config/environment.rb to disable the ActiveRecord framework, and now you’re ready to unleash it to the world, using Capistrano for deployment. But when you run ‘cap deploy:cold’, it merrily tries to run database migrations and fails with “uninitialized constant ActiveRecord”. How do you make Capistrano behave?


    A simple question, with a simple answer, but one which is curiously absent from the internet. Googlejuice ahoy!


    Stick this at the bottom of config/deploy.rb:


    namespace :deploy do
    desc "Override deploy:cold to NOT run migrations - there's no database"
    task :cold do
    update
    start
    end
    end
30 Jul 09

Twilio: Web Service API for Making and Receiving Phone Calls, building hosted IVR and PBX telephone applications

Twilio provides an in-cloud API for voice communications that leverages existing web development skills, resources and infrastructure.

www.twilio.com - Preview

phone ruby rails web-service internet-app

29 Jul 09

Ruby/WebServices Tutorial

Ruby/LDAP Installation:

You can download and install a complete Ruby/LDAP package from SOURCEFORGE.NET.

Before installing Ruby/LDAP, make sure you have following components:

*

Ruby 1.8.x (at least 1.8.2 if you want to use ldap/control).
*

OpenLDAP, Netscape SDK, Windows 2003 or Windows XP.

Now you can use standard Ruby Installation method. Before starting, if you'd like to see the available options for extconf.rb, run it with '--help' option.

www.tutorialspoint.com/...ruby_ldap.htm - Preview

ruby tutorials tips rails

1 - 20 of 135 Next › Last »
Showing 20 items per page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo