Ruby Central

top_diamond.jpg

Ruby Central Inc. is a non-profit organization based in the United States that is committed to support and for the advocacy and promotion of the Ruby programming language. This organization was founded and established by a group of Ruby advocates like David Alan Black, Richard Kilmer and Chad Fowler. Ruby central is the parent of the annual International Ruby and Ruby on Rails Conferences that serves as a presence and contact point of corporate sponsors concerned in supporting and promotion theses conferences and other Ruby activities. Its first project was RubyConf 2002 and ever since, RubyConf’s have been held. Teaming up with the San Francisco-based Software Development Forum to produce the 2006 Silicon Valley Ruby Conference, Ruby central has also become a center for support of Ruby activities.

Posted in Basics | Tagged | Comments closed

Ruby and Merb get together and form Rails 3

Ruby on Rails is set to merge with its main competitor, Merb and end up becoming Rails 3:

We all realized that working together for a common good would be much more productive than duplicating things on each side of the fence. Merb and Rails already share so much in terms of design and sensibility that joining forces seemed like the obvious way to go. All we needed was to sit down for a chat and hash it out, so we did just that.

What this will mean in practice is that the Merb team is putting their efforts into bringing all of the key Merb ideas into Rails 3. Yehuda Katz will outright join the Rails core team, Matt Aimonetti will work on a new evangelism team, and Carl Lerche and Daniel Neighman (hassox) will be co-starring the effort to bring all this over. We’ve immortalized the merge with plaque page at rubyonrails.org/merb.

Always give peace a chance, I say.

Source

Posted in Information | Comments closed

Connection Pooling

Image Source: javaworld.com

Database connection pooling is already supported by Ruby on Rails 2.2! Basically, connection pooling occurs when several of the database connections are kept open and they are all ready for queries. And when Rails gets an HTTP request and queries the database, what it does is, it gets an open database connection from the several connections that are currently open. it then goes on with its query. After it has made its query, it automatically returns the connection to the pool. The connection pooling enables the user to have a better control over interaction in the database. And it boosts performance because Rails does not connect to the database every request. Without this feature, the surging search requests in the database can slow down the over all connection.

Posted in Basics | Comments closed

File Uploading using Rails


Image Source: images.devshed.com

If you want your site visitor to upload a certain file on your server, Rails make it an easy task to undertake the requirement. We will use the new application of Ruby on Rails called upload. We can create the basic structure of the application. And we will need simple Rails commands. Start off with C:\ruby>rails upload, then decide if you’re going to save the uploaded file. Create the directory and then check permissions. Next thing to do is to create the controller and models. You can call helper function content_type to know media type of the uploaded file. Next is to open a file in write mode so we will be using open helper function which is provided by File object. The render function is to be used to redirect to view files and to display message. The last is to create a view file uploadfile.rhtml. Set the parameter to True so that the action will pass on the data properly.

Posted in Basics | Comments closed

A Complete Cross-Platform Application


Image Source:oreillynet.com

Ruby on Rails is a complete cross-platform application for web development. It is the best architecture for developing application programming. Ruby on Rails has several advantages over other frameworks. They are what makes Ruby development tasks fast and easy. It provides a meta programming method for the creation of databased web applications, which is known as, Scaffold. Using this you can easily construct templates and models needed for the majority of the basic websites, homepages and even web portals. “WEBrick” is a new technology which Ruby development uses too. The over-all sense of this, is that the library, included in the Ruby distribution, provides basic HTTP web server services and tools. Prototype, is another technological advancement which is part of the distribution also.

Posted in Programming | Tagged | Comments closed

Several Command-Line Options


Image Source: www.anylinuxwork.com

Here are some few command line options in which can guide you in programming your Ruby on Rails:

-0[octal}
The number “0” flag specifies the record separator character (\0, if no digit follows). -00 indicates paragraph mode: records are separated by two successive default record separator characters. -0777 reads the entire file at once (as it is an illegal character). Sets $/.

-a
‘Auto split mode when used with -n or -p; equivalent to executing {$F at the top of each loop iteration.

-C directory
Changes working directory to directory before executing.

-c
Checks syntax only; does not execute the program.
–copyright
Prints the copyright notice and exits.

-d, –debug
Sets $DEBUG to true. This can be used by your programs to enable additional tracing.

-e ‘command’
Executes command as one line of Ruby source. Several -e’s are allowed, and the commands are treated as multiple lines in the same program. If programfile is omitted when -e is present, execution stops after the -e commands have been run.

Posted in Advanced, Basics, Information, Medium, Programming, Sample Code, Set-Up | Comments closed

RoR and Text Editors Part-1

Though there is no preferred editor in the coding and editing of programs which is usually left to the programmer to decide. There are a couple of purpose built editors that can be used with RoR.

Emacs, has a quite simple configuration that accompanies its use and allows simultaneously displays changes as they are made hence it�s classification as a Display Editor. It also has a nifty help function the user can evoke by the simple press of the Ctrl-H keys. The Point feature allows the definition of the position of a character as they are entered onto the keyboard. The Echo Area Feature is a segment on the lower bottom of the screen editor that shows the amount of characters on the screen for various purposes should they be needed. The Mode Line is the last line on the screen which is signified by the starting and ending with dashes on the screen. Like all editors, Emacs has a menu bar where all the options available to the user can be found making use simpler instead of having to memorize special key combinations.

Posted in Basics | Comments closed

Before You Start

Assuming you have even just a little background in programming with any language there are four basic programs and extensions that you need but are provided by the quick installers you’ve just downloaded to your hard drive. You have The Ruby programming language program files, the Rails part of the programming extension/platform, MySql or your database query handling system and the Apache which is a web server that you use to emulate your application’s execution on the web. Granting you have these set up properly and tested (instructions for which are included in the installer package). You can now start building your first application with RoR.

Posted in Advanced, Basics, Medium, Set-Up | Tagged , , , | Comments closed

How Rails implements Ajax

aptanaradrails_thumb.jpg

When the browser displays the initial web page, different user actions cause it to display a new web page or prompt an Ajax operation:

1.A trigger action occurs and this could be because of the user clicking on a link or button or the user making changes to the information on a form in a field or just an interrupted activation.
2.Data linked with the trigger is sent to an action handler on the server through XMLHttpRequest.
3.The server-side action handler takes some action basing on the data and returns with a response, an HTML fragment.
4.The client-side Javascript accepts the HTML fragment and uses it to update a particular portion of the current page’s HTML, often the content of a

tag.

Posted in Basics | Tagged , | Comments closed

RUBY with just-in-time compilation

2ed1fe69802.jpg

There are several alternative implementations and completion of the Ruby language as of 2008 including JRuby, Rubinius, IronRuby and YARV. Each of them has different approach especially that JRuby provides just-in-time compilation functionality. JIT or just-in-time compilation is also known as Dynamic Translation. In computing, it is a system and a technique for improving runtime performance of a computer program. It has two earlier ideas in run-time environments such as dynamic compilation and bytecode compilation. Its advantage over statically compiling the code at development time is that it can recompile the code and its ability to enforce security guarantees. Hence it can merge a few of the advantages of interpretation and static compilation.

Posted in Basics, Programming | Tagged , | Comments closed