Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Lessons Learnt

1.Mysql2::Error (Access denied for user 'root'@'localhost' (using password: NO))


Solution: Tyoe the command in the terminal "sudo dpkg-reconfigure mysql-server-5
.5". This would reconfigure the password of the mysql database. The error obtain
ed is so because of the fact that, the password for the mysql database is left t
o blank. Hence the root user is unable to access it.
2. How does rails handle request?
Ans: It first checks in the public folder to see if there are any request that i
t could match/render. If so it does. Only in case it doesn't find anything, it t
alks to rails framework where the 'routes' take care of directing the request.
3. Types of routes.
There are three types of route namely, the simple, default and the root routes.
The default route is outdated and is no longer in use. The simple route is the o
ne which is of form "get "demo/index" ", where the rails route framework matches
for the exact phrase in order to satisfy the request. The default route is of t
he form, "match ':controller(/:demo(/:id))', :via => :get". The root route is th
e one which can be used for routing request to home page. This could be defined
as root "welcome#index"

You might also like