Tag: technology

  • Installation Steps for Ruby on Rails

    Steps to install Ruby on Rails

    1) Setting up the Rails development environment

    Ruby, rubygems, rails and other required packages can be installed by :

    1. sudo apt-get install build-essential
    2. $ sudo apt-get install ruby-full
    3. $ cd Downloads
    4. $ wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
    5. $ tar xzvf rubygems-1.8.24.tgz
    6. $ sudo mv rubygems-1.8.24 /usr/local/src
    7. $ cd 
    8. $ cd /usr/local/src
    9. $ cd rubygems-1.8.24
    10. $ sudo ruby setup.rb
    11. $ sudo update-alternatives –install /usr/bin/gem gem /usr/bin/gem1.8 1 
      If you got error in this step (ERROR: update-alterntives:error: unknown argument ‘–install’),   then retype ‘–‘ (Two Hyphens) before install
    12. $ sudo gem install rails

    2) Setting up MySQL Database

    If you have already installed Mysql then ignore this step.

    $ sudo apt-get install mysql-server

    Well you have now install Ruby on Rails ,Now its time to test it. So Create a Rails’s application .Here name of Rails application is new ,you can give your own name.

    Go to place where you want to create Ruby on Rails application and run these commands in terminal :

    rails new
    cd new
    rails server

    The rails server command launches a small web server named WEBrick which comes bundled with Ruby. You’ll use this any time you want to view your work through a web browser.
    This command will give you the following output in terminal

    => Booting WEBrick => Rails 3.0.0 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2010-04-18 03:20:33] INFO WEBrick 1.3.1 [2010-04-18 03:20:33] INFO ruby 1.8.7 (2010-01-10) [x86_64-linux] [2010-04-18 03:20:33] INFO WEBrick::HTTPServer#start: pid=26086 port=3000

    With just three commands we whipped up a Rails server listening on port 3000. Go to your browser and open http://localhost:3000, you will see a basic rails app running.
    Congratulations ,You are now running Ruby on Rails.
    If you want to stop server then Press Ctrl+C in terminal

    Continue to Configuring the Database in Ruby on Rails.

  • Video Chat with OpenTok

    OpenTok

    The OpenTok video chat platform delivers the simplicity and customization that developers need for building modern web applications. This new API lets you call the shots. You have full control over layout, who sees whom, and who just watches.

    The OpenTok API is a free and flexible cloud-based API, making it easy to add video chat to your applications without having to worry about infrastructure and scale—build your app using our simple JavaScript or ActionScript libraries.

    Technical Requirements for OpenTok

    End users will need the following:

    • Flash Player 10.3 or later
    • Firefox 3.0+, Safari 4.0+, Internet Explorer 7+, Chrome
    • Windows XP+, OSX 10.4+
    • A webcam and a microphone!
    • A standard DSL line with a minimum upload and download speed of 160kb per call participant

    OpenTok in Linux

    OpenTok does not support in Linux but it provides facility to support Linux by adding {wmode : “window”}  in session.publisher function. If video chat is not working after adding this then do the following changes :

    • Download webcamstudio for video chatting using OpenTok

    Link to install webcamstudio :
    http://mandeepsimak.wordpress.com/2012/05/18/webcamstudio-a-free-virtual-webcam-software-with-cool-effects-ubuntu-11-1012-04/

    OR

    • Do the global settings of Adobe Flash Player
    Open 
    and choose Always Allow for static.opentok.com and staging.opentok.com it will allow it to work properly.

    Options available with OpenTok

    • Video Recording
    • Video chatting
    • Video Conferencing
    • Video Archiving

    Limitations of OpenTok

    • High speed internet connection is required. 
    • Global settings for Adobe Flash should be done for using OpenTok in Linux.
    • Sometimes after changes Flash settings, it doesn’t work.
    • Linux and Flash Player do not combine very well. So, we have to install Webcam Studio in Linux to fix camera acquisition problem.