I am not familar with the RoR site stucture on Apache. I did this but.it doen''t work. I only want to output a word on a page with RoR. I did this 1. >cd public_html (enter web root) 2. >rails sayhello 3. >cd sayhello 4. >cd app 5. >cd controller (enter controller folder) 6. edit application.rb def hello end 7. cd views (enter views folder ) 8. add a new file hello.rhtml 9. edit new file hello.rhtml <html> <head> <title> test </title> </head> <body> Hello world!! </body> <html> 10. view this from browser http://*****/sayhello/hello but I get 404 error I test ruby -v and rails -v.I am sure the installation is fine.this is a RoR hosting provider. Thank you for help Mark -- Posted via http://www.ruby-forum.com/.
>http://*****/sayhello/hello > >but I get 404 error > >I test ruby -v and rails -v.I am sure the installation is fine.this is a >RoR hosting provider. > >Thank you for help > >Mark >You dont have a sayhello controller in your code, You added the action to application which isnt really what you want... It seems like you need to read some rails tutorials...try google Mikkel Bruun www.strongside.dk - Football Portal(DK) nflfeed.helenius.org - Football News(DK) ting.minline.dk - Buy Old Stuff!(DK) -- Posted with http://DevLists.com. Sign up and save your time!
sayhello is the application name and hello is method. please let me know how to fix it.thanks -- Posted via http://www.ruby-forum.com/.
My question is how to edit edit application.rb and how to add views pages. Mark mark sheran wrote:> sayhello is the application name and hello is method. > > please let me know how to fix it.thanks-- Posted via http://www.ruby-forum.com/.
Your understanding of how rails works is pretty far off base. I, or someone else, could write up a long explanation of how it works, but there are already lots of good tutorials out there. And one of the central tenets of rails is that you Don''t Repeat Yourself. So: http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html http://wiki.rubyonrails.com/rails http://rails.homelinux.org/ Read some stuff from those. The first link is a tutorial that has a "hello world" page as one step. It''s second page talks all about the structure of a rails app. And I hate to say it, but these may not be enough to really learn rails... I''ve found the "Agile Web Development with Rails" book indispensible. Good luck! b mark sheran wrote:> My question is how to edit edit application.rb > and how to add views pages. > > Mark > mark sheran wrote: > >>sayhello is the application name and hello is method. >> >>please let me know how to fix it.thanks > > >