i am stuck with a problem with my ruby on rails.KINDLY help me clear the problem and please provide with a good concept of it also.
Scenario :
uptil now everything was going fine till today.as per a requirement of the application i am supposed to add some static pages to an existing ROR application.basically the application is developed and is working fine and i need to add some static pages to it.i had put some static pages in the public folder and evrything was going so for smoothly.bt at a point in the application , i.e the index page of the application there is a login for the application ( not for the static pages ) and i had put that login in one of the div of those static pages (views/users/index.erb) had copy pasted the code from index.html to index.erb.so the moment i put up the address the login page is delivered and the site navigation works too.but when i click home (page of the public folder is shown up and the code of the application’s login doesnt work.) i want it to show up with index.erb that’s in the views folder.
i want to redirect somehow to the page in the views (views/users/index.erb) .. tried href etc cudnt work.
hope i could put the problem in a good way for a good understanding of the problem.
and i am using rubymine editor
P.S I am new to ROR .. total new.Had .NET as my domain.so please provide me with some basic tutorial links where i can systematically understand MVC and ROR.Googling dint help 🙁
waiting for your answers 🙂
RoR takes a little bit of work and understanding to grasp, mostly because there is so much too it; from “code” to “installation/configuration” to “deploy”.
Sounds like you need to look up and understand “Routing” for Static Pages.
You are quite right, the default location will be “public” with the index.html page inside there. Leave that as such; as if your “Routing” is working correctly, then views/users/index.erb will show up.
Just to give you some general direction;
Add your configuration in config/routes.rb
Then use the root to: command.
My configuration: (this links to app/views/static_pages/home.html.erb)
That works perfectly.
You might also want to check in the “logs” folder for possible errors.