i am trying to create one web application using ror, i created directory
structure and started webrick server, after the when go for
http://127.0.0.1:3000/, it gives the home page, after that i created one
controller and rhtml file regarding that controller.
but when i want to access that from the browser it gives the error like
this "Access denied for user 'root'@'localhost' (using password: NO)".
can any bady just help me to rectify this problam. i am using rails
2.0.2 and mysql 5.0 versions.
This is coming from MySql. You need to set up config/database.yml to
match your mysql setup.
You can run mysql with no password for the root user, which is not
advisable, but is often done in a DEVELOPMENT environment. It looks
like your mysql setup requires a root user password.
You can remove the password, if the machine is totally under your
control, I can't recall the details but a little googling should find
them for you.
The other alternative is to put the root mysql password in the
config/database.yml file.
The more normal setup is to create a mysql user for the Rails app, and
give it access to only the databases and tables it needs. You really
want to do something like this for the deployed production action.