Hi again.
Well I seem to have fixed something today by installing Mysql 4.1.14
from 4.0.25.
Instead i have new error like this trying to do: ruby script/generate
scaffold Product Admin
error Before updating scaffolding from new DB schema, try creating a
table for your model (Product)
in the end after all files where generated, assuming that the file -
form.rhtml is still missing.
I have configured the database.yml to correct settings.
I,ve been reading all over the internet about problems with Tiger,
Mysql 4.1 and Ruby and tryed alot but no solution yet.
Does anyone know a good solution that worked for him ?
Thanks in advance,
Agust
On 31.8.2005, at 23:20, Ágúst Atlason wrote:
> Hello.
>
> I´m a begginer in RoR and bought this nice book "Agile
> webdevelopement with rails".
> Everything have gone good so far until I started to make my first
> application in chapter 6 of this book.
>
> I have done everithing up to page 56. On page 57, i,m told to write
> the maintenance app with this command in Terminal window:
>
> aga:~/work/depot AGA$ ruby script/generate scaffold Product Admin
> dependency model
> exists app/models/
> exists test/unit/
> exists test/fixtures/
> skip app/models/product.rb
> skip test/unit/product_test.rb
> skip test/fixtures/products.yml
> exists app/controllers/
> exists app/helpers/
> exists app/views/admin
> exists test/functional/
> overwrite app/controllers/admin_controller.rb? [Ynaq] y
> force app/controllers/admin_controller.rb
> overwrite test/functional/admin_controller_test.rb? [Ynaq] y
> force test/functional/admin_controller_test.rb
> overwrite app/helpers/admin_helper.rb? [Ynaq] y
> force app/helpers/admin_helper.rb
> overwrite app/views/layouts/admin.rhtml? [Ynaq] y
> force app/views/layouts/admin.rhtml
> overwrite public/stylesheets/scaffold.css? [Ynaq] y
> force public/stylesheets/scaffold.css
> overwrite app/views/admin/list.rhtml? [Ynaq] y
> force app/views/admin/list.rhtml
> overwrite app/views/admin/show.rhtml? [Ynaq] y
> force app/views/admin/show.rhtml
> overwrite app/views/admin/new.rhtml? [Ynaq] y
> force app/views/admin/new.rhtml
> overwrite app/views/admin/edit.rhtml? [Ynaq] y
> force app/views/admin/edit.rhtml
> WARNING: You have a nil object when you probably didn''t expect
> it! Odds are you
> want an instance of Array instead.
>
> Look in the callstack to see where you''re working with an object
> that could be nil.
> Investigate your methods and make sure the object is what you expect!
> aga:~/work/depot AGA$
>
> [Ynaq] y <-- this is in there because i tryed over and over again :)
>
> Now in the book it is told that there should be one more file
> generated: app/views/admin/_form.rhtml
> This file is missing.
>
> I start up the server,
>
> This is the error i get there and when i visit http://localhost:3000
>
> NoMethodError in Admin#index
>
> undefined method `fetch_fields'' for nil:NilClass
> /app/controllers/admin_controller.rb:8:in `list''
> /app/controllers/admin_controller.rb:3:in `index''
> script/server:49
> Show framework trace
>
>
> Request
>
> Parameters: None
>
> Show session dump
>
> Response
>
> Headers: {"cookie"=>[],
"Cache-Control"=>"no-cache"}
>
> Have anyone seen this and knows how to fix ?
>
> Now, im a total begginer in this stuff, so please be gentle :)
>
> Best regards,
>
> Ágúst G. Atlason
>
> www.dzdesign.dk
> gusti-ZCJJ+LxNw0Nknbxzx/v8hQ@public.gmane.org
> TLF: 0045-7550 6363
> Mobil: 0045-27583448
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
Ágúst G. Atlason
www.dzdesign.dk
gusti-ZCJJ+LxNw0Nknbxzx/v8hQ@public.gmane.org
TLF: 0045-7550 6363
Mobil: 0045-27583448
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails