Today anna univ Dec – 2010 Revaluation Results came. Me cleared my one arrears paper. 🙂 🙂 🙂
The result links are
Today i finished 5th chapter of Learning rails by example.
Today i used some css codes also. 🙂
i deployed my sample app into heroku site. here the link http://strong-sunrise-136.heroku.com/
But finally got a problem, still i didn’t clear the problem, the problem is when i usineg ” rspec spec/” to check the codes, i got this result 😦 But all were working very well. i don’t know about this problem. first time i’m facing this problem,
[suresh@mercury final_third_part]$ !rs
1) UsersController GET ‘new’ should have the right title
Failure/Error: response.should have_selector(“title”,
expected following output to contain a <title>Sign up</title> tag:
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN” “http://www.w3.org/TR/REC-html40/loose.dtd“>
# ./spec/controllers/users_controller_spec.rb:13:in `block (3 levels) in <top (required)>’
Finished in 0.78985 seconds
16 examples, 1 failure
Updated: Now i got the solution for this problem. I missed to add “render_views” into the “spec/controllers/users_controller_spec.rb ” file
This is the simple and sample application to create using rails and heroku is here. This post mostly covers 3rd part of the “Learn Rails By Example” book.
$ rails new sample app -T
$ rails generate controller Pages home contact
$ gedit Gemfile
Edit the file and add the following,
source 'http://rubygems.org' gem 'rails', '3.0.3' gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3' group :development do gem 'rspec-rails', '2.3.0' end group :test do gem 'rspec', '2.3.0' gem 'webrat', '0.7.1' gem 'spork' end
The Pages controller spec with a base title. spec/controllers/pages_controller_spec.rb
require 'spec_helper' describe PagesController do render_views describe "GET 'home'" do it "should be successful" do get 'home' response.should be_success end it "should have the right title" do get 'home' response.should have_selector("title", :content => "Ruby on Rails Sample App | Home") end end describe "GET 'contact'" do it "should be successful" do get 'contact' response.should be_success end it "should have the right title" do get 'contact' response.should have_selector("title", :content => "Ruby on Rails Sample App | Contact") end end describe "GET 'about'" do it "should be successful" do get 'about' response.should be_success end it "should have the right title" do get 'about' response.should have_selector("title", :content => "Ruby on Rails Sample App | About") end end end
The Pages controller with per-page titles.
class PagesController < ApplicationController def home @title = "Home" end def contact @title = "Contact" end def about @title = "About" end end
The sample application site layout.
<!DOCTYPE html> <html> <head> <title>Ruby on Rails Sample App | <%= @title %></title> <%= csrf_meta_tag %> </head> <body> <%= yield %> </body> </html>
The Home view with HTML structure removed.
<h1>Sample App</h1> <p> This is the home page for the <a href="https://thasulinux.wordpress.com/">My Blog Home page</a> sample application. </p>
The Contact view with HTML structure removed.
<h1>Sample App</h1> <p> This is the about page for <a href="http://about.me/thasuresh/">Me</a> sample application. </p>
The About view with HTML structure removed.
app/views/pages/about.html.erb (This “about” page we ve to create manually)
<h1>About Me</h1> <p> Contact Ruby on Rails Tutorial about the sample app at the <a href="https://thasulinux.wordpress.com/about/">feedback page</a>. </p>
check out my sample project on-line at http://strong-sunrise-136.heroku.com/
In the url bar add this following “.com /” “pages/home” “pages/contact” “pages/about”
(Now, those is url were not in use, try http://strong-sunrise-136.heroku.com/)
If you want fun with terminal, follow the following instructions. 🙂 This is the project called ASCIIquarium. To install this we have to install some ‘prerequisites’ (Perl Module)
$ sudo yum install perl-Curses perl-Extutils-MakeMaker
$ wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz
$ tar xzvf Term-Animation-2.4.tar.gz
$ cd Term-Animation-2.4
$ perl Makefile.PL && make
$ sudo make install
Now we are going to download the ‘asciiquarium’
😛 😀 😉 That’s All !!!
Note: If you want install this in your Ubuntu machine see here
Avant Window Navigator(AWN) is a dock-like navigation bar for the Linux desktop that positions itself at the bottom of the screen. It can be used to keep track of open windows and behaves like a normal window list.
Installing Avant Window Navigator(AWN) in Fedora 14:
Type these as root user.
To install Avant Window Navigator(AWN),
$ yum install avant-window-navigator
To install the necessary applets for AWN,
$ yum install awn-extras-applets
$ sudo apt-get install avant-window-navigator
Today i installed REDHAT 5 to improve my Linux Admin knowledge. Currently i’m using fedora. In our Office we have spl Admin class for us.
The Simple procedure to install RHCE under VBOX:
That’s All 🙂
In my Fedora machine i have Vm Virtual Box. me already installed ubuntu 10.10 inside of V Box. in our Office very weekend we have spl Admin class for us.
So, i installed a REDHAT 5. In side of VBox i separately installed REDHAT 3 times. Among the 3, one was server and other 2 were client.
The simple procedure for installing OS inside Virtual Box:
That’s All !!! 🙂