Wednesday 18 September 2013

What does "Rack-based" mean in the context of ruby frameworks?


What does "Rack-based" mean in the context of ruby frameworks?


It means frameworks that implement the Rack interface, a common way for web servers and frameworks to communicate with each other. Using a Rack-based framework means that your web app can run on numerous servers (e.g., Mongrel, Litespeed, Passenger (Apache/Nginx), and whatever Heroku uses) without requiring special plug-ins.

Rack also provides "middleware," a lightweight layer between the web server and the framework. This lets you do things like proxies, logging, testing, and authentication in a fast and framework-independent way.

Sunday 4 August 2013

ubuntu : gedit plugin package for Ruby on Rails developers :

32 bit deb package and 64 bit deb package

It includes awesome plugins in gedit editor, you can enable them by doing click on check-box associated with plugin.

follow the steps to enable plugins in gedit :

File menu => Edit => Preferences => Plugins

reference : http://www.ubuntuupdates.org/package/ubuntu-on-rails/oneiric/main/base/gedit-gmate


Tuesday 30 July 2013

Rails default_scope is evil

http://rails-bestpractices.com/posts/806-default_scope-is-evil

Wednesday 24 July 2013


'Screen' it's really awesome, we can create a session with multiple interactive shells, and can share a server screen with multiple ssh connections.

Screen : Screen is a terminal multiplexer, which allows a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session (such as when using SSH).

Suppose you want to run a program persistently (even if a terminal window closes, for example). For that, you might use the nohup command. But what if you want to start a command-line session on one computer and then go home and resume that session? For something like that, you’ll want to use screen. Screen is also really handy because you can have multiple shells running in one terminal window.

A quick tutorial on screen, please visit here

Steps to install 'Screen', and some basic important commands

1. Installing screen

apt-get install screen

2. To create a new session

screen -S <session-name>

2. the most important screen commands that you need to control screen. These commands begin with CTRL a to distinguish them from normal shell commands.

    Ctrl a c - Creates a new screen session so that you can use more than one screen session at once.
    Ctrl a n - Switches to the next screen session (if you use more than one).
    Ctrl a p - Switches to the previous screen session (if you use more than one).
    Ctrl a d - Detaches a screen session (without killing the processes in it - they continue).
   
3. To list down all current sessions

screen -ls

4. To reattach on perticular session

screen -r <session_name>

3. To close a screen session where all tasks are finished you can type

exit

reference :
https://help.ubuntu.com/community/Screen
http://www.mattcutts.com/blog/a-quick-tutorial-on-screen/
http://www.howtoforge.com/linux_screen