Page Display Error
 |
Hi Everyone, this is my first post. So I'll try to be as detailed as possible.
Dev Machine: OSX 10.5.2
Ruby: 1.8.6 (2007-09-24 patchlevel 111) [universal-darwin9.0]
Rails: 2.0.2
Using MAMP 1.7.1 with the following settings
PHP: 5.2.5
MYSQL : 5.0.41
Using CocoaMySQL .7b5
TextMate 1.5.7
I've built several sites using basic HTML, PHP, ASP, ect, but this is my first jump into web2.0 development.
I'm learning ruby on rails and am going through some of the tutorials.
Some tutorials work fine, ei. http://railsonedge.blogspot.com/2008/03/tutorial-beginning-ajax-with-rails-20.html
Others don't. They say they are written for rails 2.+ and ruby 1.8.6 but the result I get is nearly universal.
Take the example below from http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html
I get to the step after creating the migration file "001_create_movies.rb". I run rake db:migrate, verify with cocoamysql that the tables and fields are created properly. They do so I run ruby script/server.
The server loads up as expected http://localhost:3000. But when I navigate to http://localhost:3000/movies I DO NOT get the expected results.
I am missing the description field and one_sheet_url field. I followed the instructions to the letter up to that point. Again, this similar result has happened with other tutorials so I think the error is somewhere on my end.
[b]This is what I should have:[/b]
[img]http://bp0.blogger.com/_fnfsff2gWFY/R2PwNTuWBmI/AAAAAAAAAA8/U7wskSum5z0/s1600/movies1.png[/img]
[img]http://bp0.blogger.com/_fnfsff2gWFY/R2PwNTuWBnI/AAAAAAAAABE/3fzWebHr_ic/s1600/movies2.png[/img]
[img]http://bp1.blogger.com/_fnfsff2gWFY/R2PwNjuWBoI/AAAAAAAAABM/XiEST0Z9cxI/s1600/movies3.png[/img]
I case the pics don't come up above:
http://bp0.blogger.com/_fnfsff2gWFY/R2PwNTuWBmI/AAAAAAAAAA8/U7wskSum5z0/s1600/movies1.png
http://bp0.blogger.com/_fnfsff2gWFY/R2PwNTuWBnI/AAAAAAAAABE/3fzWebHr_ic/s1600/movies2.png
http://bp1.blogger.com/_fnfsff2gWFY/R2PwNjuWBoI/AAAAAAAAABM/XiEST0Z9cxI/s1600/movies3.png
[b]But I get this:[/b]
[img]http://i134.photobucket.com/albums/q118/shaiss/Picture3.png[/img]
[img]http://i134.photobucket.com/albums/q118/shaiss/Picture4.png[/img]
[img]http://i134.photobucket.com/albums/q118/shaiss/Picture5.png[/img]
I case the pics don't come up above:
http://i134.photobucket.com/albums/q118/shaiss/Picture3.png
http://i134.photobucket.com/albums/q118/shaiss/Picture4.png
http://i134.photobucket.com/albums/q118/shaiss/Picture5.png
Here is the output from terminal: http://pastie.caboo.se/170436
I've tried the page in safari 3.1 and firefox 3b4. Like I said this only happens with certain tutorials I go through. I'm a noob at this so its frustrating not understanding why this is happening. If anyone can help clear this up for me I would greatly appreciate it. Thank you for your time,
Shai |
| |
|
 |
looks like your movies table only has title field, but missing rest of fields.
if you go buy the rails book, although a bit old by now, but still quite usable. http://www.pragprog.com/titles/rails2
there's a website heroku.com that you can write a rails app online, although pretty slow, but i think is a good learning tool. I've setup test site http://shaiss.heroku.com/ , you should have invitation email from them also. so you can try use that, and I can help you to debug online.
|
| |
|
|
|