I want to build a cms from scratch on rails.... I want it to be as similar as it can be to wordpress. What tips can you give me?.. Should the admin part and the user part be completely separated as in a totally different app?.. or should all be integrated into one app?... How would you set it up??.. please be as specific as you can be.
As much as I enjoy writing in Ruby and Rails, I wouldn't. Reinventing the wheel is nearly always a waste of time. Stick with one of the existing CMS solutions. Wikipedia provides a list of Rails based CMS.
However, reimplementing an existing project to better understand how the underlying platform works, isn't exactly a bad idea.
The administrative interface should be part of the same app. With clever routing and filters you can adjust views to provide more options to administrative users, without drastically duplicating code.
If you want something similar to wordpress why don't you just use wordpress?
Id reccomend watching the Web Log in 15 mins screen cast done by ryan bates. If you want authorization and permissions you should watch railscasts episodes #160 (authlogic) and #188 (Declarative Authorization).
I use both those gems in my CMS which creates a blog from marked topics in the forums.
The admin part can be in the same app, why would it be sepperate? the user would then need a server capable of hosting multiple apps on port 80 to be any use.
As people have said why not just use wordpress? theres no point re-inventing the wheel