I changed fairly much in my app without constant testing ( my bad )
now i get an error which I cannot seem to debug point my finger on.
I have a home controller which just displays a welcome page this had a
index only action.
Whatever controller I try to open i always get above error message
ActionView::TemplateError (undefined method `show' for
#<Haml::Precompiler::Line:0x10547ef40>) in app/views/home/
index.html.haml:
Showing app/views/home/index.html.haml where line # raised:
undefined method `show' for #<Haml::Precompiler::Line:0x10547ef40>
Extracted source (around line #):
The extracted source around line # is zero
Any more advanched ruby on rails programmers can help me point my
finger on where this error comes from?
I dont understand every controller I try to open in browser gives this
error message,
cleaning my routes.rb to the rails default and setting only home
controller as root also does not resolve this error.
I changed fairly much in my app without constant testing ( my bad )
now i get an error which I cannot seem to debug point my finger on.
Looks like haml's blowing up trying to precompile your
index.html.haml view, which could either be that this file is very
screwed or that there's a bug in haml itself.
Thanks for pointing that out , i thought of a code error somewhere
but after I delete the index.html.haml it throws error missing
template index.html.haml
now I recreated the file with a blank file no contents but then the
error pops up again, it could be some disk based issue so im now
running disk utility (osx)
hope that solves the issue
Anyone else some suggestions?
After removing the index.html.haml file i get the default missing
template error but if i open *any* other controller for example /post
i get EXACT the same error.. why is this happening ?
It seems that before any rendering is done it looks for an action
"show" somehow even if i remove all routes and have just the basic
ones
Anyone else some suggestions?
After removing the index.html.haml file i get the default missing
template error but if i open *any* other controller for example /post
i get EXACT the same error.. why is this happening ?
It seems that before any rendering is done it looks for an action
"show" somehow even if i remove all routes and have just the basic
ones
Can you go back to your most recent known good backup and check it
still works? This will prove whether it is a system problem or
related to changes made in your app.
Another thought might be to try creating a new simple app and make
sure that works.
I could go back to a backup but loose a lot of new work on the app
Still hope to find a fix somewhere but this error is really strange
not anything else ive seen so far been able to
debug all errors i came across with google perhaps its a system disk
error, i repaired disk and no errors in my project path
so this is still a very very strange issue. hope to find a soiution,
if anyone has any ideas i would love to hear them.
My older backup seems to work fine
Could you not top-post please, it makes it difficult to follow the
thread, insert your reply in the previous post instead. Thanks.
I could go back to a backup but loose a lot of new work on the app
Still hope to find a fix somewhere but this error is really strange
not anything else ive seen so far been able to
debug all errors i came across with google perhaps its a system disk
error, i repaired disk and no errors in my project path
so this is still a very very strange issue. hope to find a soiution,
if anyone has any ideas i would love to hear them.
My older backup seems to work fine
By confirming that the backup works then at least you have confirmed
that it is related to the app and not the system. I can only suggest
removing bits from the app till you get something that works and
working back from there.
I know it doesn't help, but I think it is worth pointing out for the
future the desirability of using a source control system such as git.
Along with frequent commits (often several times a day) this means
that one can always work backwards to find when a problem was
introduced.
thanks for the comments so far,
I only did a git commit on every deploy I now will do it after each
few changes..
Removed some stuff from the app I added before the error occured still
same error
This is my full trace/error report
NoMethodError in Home#index
Showing app/views/home/index.html.haml where line # raised:
undefined method `show' for #<Haml::Precompiler::Line:0x1061c0fc8>
NoMethodError in Home#index
Showing app/views/home/index.html.haml where line # raised:
undefined method `show' for #<Haml::Precompiler::Line:0x1061c0fc8>
Have you updated any gems or plugins or vendored anything since it was
working? It looks like the sort of error that might be caused by
mismatched stuff.
Is anything working at all or is the whole thing broken? What happens
if you add a new controller and view? Don't forget to commit
regularly during this phase so you can work out (eventually) what you
did to fix it and revert the bits you didn't need to do. Probably
good to set up a branch to play about on.
I completly reinstalled my OSX today and yesterday since i had very
slow performance
I was hoping it would fix my problem also but still not working ! argh
i removed subdomain fu gem from my app which I added for the rest I
only added some controllers and views which I have all moved to
another direcotry outside the app
Still the problem persist.. it seems I have to completly do my app
over this is worst case scenario, I wonder if any thing like this
happened to anyone here?
Perhaps some other suggestions ideas?
Im going to remove more of the app code to see if it starts working
again in a few mins
cannot thing of anything else
It does complain that test_unit vendor is not installed
I have no idea what this is or what is needing this why it needs to be
installed
I have nothing in my environment.rb stating anything like test_unit
the gem is installed but it still ask for it to be installed ( I use
rubymine that makes me attend on this )
Also rubymine was totally newly installed like the rest of the OSX,
ruby on rails and gems
Im going to check my disk with diskwarrior although I removed all
files from disk and reinstalled and copyed the app files back from
time machine backup
my finder hang 2 times on that directory so it might be some strange
messed up file, I try diskwarrior and report back if this fixed the
issue, files open fine though
not sure if this could be sometehing that fixes it
I completly reinstalled my OSX today and yesterday since i had very
slow performance
I was hoping it would fix my problem also but still not working ! argh
i removed subdomain fu gem from my app which I added for the rest I
only added some controllers and views which I have all moved to
another direcotry outside the app
Still the problem persist.. it seems I have to completly do my app
over this is worst case scenario
You said previously that you commit to git at each deploy, so
presumably you do not need to completely redo it, just go back to the
previous version.
Then you can presumably take large chunks of the code from your latest
(non-working) version and add them in, updating and running your tests
at each point.
Eventually this wat fixed
It was an unpacked gem that I proclaimed correct, I should have
removed it..
Fixed a week or 2 ago I thought to just followup in case in future
someone has this problem remove your
gems/vendor directory