Know the Basics in ROR

11/11/2009

Ruby on Rails has, focused on addressing the creation of templates and designs that the unglamorous problems. It is not also create a sophisticated development framework that the engineers at Google or Amazon in droves is on, like a database changes, the vast majority of Web developers face every day.

True to the ideals of web development, the Rails community is composed of people wanting to reach out to help others. This thriving community builds its foundation on the virtue of sharing knowledge with one another in order to help create a better virtual world and one of the many ways through which Ruby on Rails carry out this mission is by having mailing lists for its users. These mailing lists include: a) A general list where Rail users can discuss information and projects; b) A core list for issues concerning patches; c) Prototype talk on Javascript and Ajax, and; d) A security announcement list for critical patches.

The key to a successful online web development community is accurate and accessible documentation for everyone. That is why the Rails community came up with its own Rails wiki so that users can contribute information and other helpful tips to fellow Rails users. The Rails wiki has everything from the how-to's in getting started with Rails (installation guides, tutorials, books and FAQ, troubleshooting, tip sheet for beginners, etc.) to community announcements (trainings and job postings, development firms, etc.). One can also find in the Rails wiki the lists of online help groups for Rails users (forums, IRC, user groups, ProblemBase, etc.)

You can always debug your application and get it back on the rails if ever it something goes wrong. You have to check the application log files. See to it that "tail -f" commands are running on the server.log and development.log. Rails will then show debugging and runtime information to these files and debugging information will also be displayed in the browser on requests from 127.0.0.1.

In your use of Ruby on the record from the controller class, you can also record your own information directly from your code, such as log file:

class WeblogController < ActionController::Base
def destroy
@weblog = Weblog.find(params[:id])
@weblog.destroy
logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
end
end

There are a lot of web servers that are compatible with Rails, but Apache and Lighttpd are said to be the most popular. Any web server that supports mod_ruby (Apache), CGI, or SCGI can be used for running Rails. You may also want to try tinkering with Lighttpd, which can rival Apache 2.0.54 in speed, by using MPM Worker on Debian 3.1 (claimed to be faster than Apache 1.x or2.x MPM Prefork). However, working with Lighttpd-1.4.10 can be very buggy so you might want to consider using Lighttpd-1.4.11 or a newer version instead. Zed Shaw's Mongrel, a ruby based webserver that utilizes Cextensions to increase performance, is also another good option. You can run Mongrel on its own or in a cluster behind an Apache or a Lighttpd proxy.

Create a list of all software to be downloaded and installed. In this example, create a directory is

cd /
mkdir temp
chmod 775 temp

Now, download, configure and install Ruby. Wget is used in this example:

cd temp
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.2.tar.gz
tar -zxvf ruby-1.8.2.tar.gz cd ruby-1.8.2

Specify an install directory since there are times when it is not entitled to install things in the normal roll. Here we can see the

./configure -prefix=/usr/local/ruby -exec-prefix=/usr/local/ruby

Now, you have a Makefile that you can compile:

make
make install

Your Ruby is now installed. You should try making a symbolic link to Ruby somewhere in your local path:

ln -s /usr/local/ruby/bin/ruby /usr/local/bin/ruby

Posted in: javascript tutorial| Tags: Online Application Information Wiki web development weblog list community mailing

Finding Answers to Specific Problems – search engine

10/18/2009

I have heard colleagues muse about the changing role of “software developer,” postulating that development has become a job mostly concerned with research and discovery. While that is no doubt an overstatement, the ability to find information quickly is an important skill. The place many of us turn to first is our search engine of choice whether it’s Bing (replaces Live Search), Google, or a meta search site like Dogpile.
The appeal of most search engines is the beautiful simplicity of a single search box, but the needs of a developer are not simple when you factor in multiple versions of frameworks, programming languages with similar constructs, and behavior differences between competing products (I’m looking at you, Structured Query Language and Cascading Style Sheets). With just a short time investment, you can learn some advanced search operators and tricks to help narrow search results to exactly the information you need. For example, search for “live advanced search keywords” or “google advanced operators” and you’ll find a bunch of operators to help you become a search ninja.
In addition to your search engine of choice, Wikipedia can be an invaluable problem solving tool. I have found Wikipedia to be especially useful when searching for general topics such as common computer science algorithms and concepts. Although I often end up at Wikipedia through search engine results,
Wikipedia has its own search box right on the home page (http://wikipedia.org/).
Of course not all problems will have solutions waiting to be discovered via a search engine. Some problems have already been solved in another part of your organization and you simply have no idea about the pre-existing solution. There are many tools designed to help companies deal with code asset management and search behind the firewall. One interesting product is Krugle, a specialty search engine built for indexing and searching code.

Posted in: Software Programming C# and .NET| Tags: Specific Problems Problems Search Engine colleagues Software developer Cascading Style Sheets Structured Query Language Wiki wikipedia google advanced operators

Hot Posts

Latest posts

Tags

Others

Sponsors

asp.net interview questions