I have tried to learn ruby on rails from scratch by going into a
tutorial at the following website.
I followed the suggestions and encountered 3 problems so far.
- Couldn’t start the Apache server. Error message “Port 80 was used by
some other process.” I over-came the problem by going
into configuration and change the port to 4001.
2. I couln’t connect to my localhost using the MySQL-Front. I overcame
the problem by following the explanation in one
website and run RegEdit and changed some setting in the Windows
3. I copied and pasted the codes for edit.rhtml, and run the example and
found that text boxes were not filled with the
desired fields, but the source codes instead. I deleted every thing and
re-installed every thing, and came to the same
problems in “Edit”.
The error message is now as follows:
RuntimeError in Recipe#edit
Showing app/views/recipe/edit.rhtml where line #8 raised:
Called id for nil, which would mistakenly be 4 – if you really wanted
the id of nil, use object_id
Extracted source (around line #8):
9: <input id=“recipe_id” name=“recipe[id]” size=“30”
10: type=“hidden” value="<%= @recipe.id %>" />
It appears that @recipe is null.
Any assistance will be appreciated.