|Ramaze 2011.07.25 User helper bug||John||8/10/11 10:09 AM|
hi I just upgraded to 2011.07.25 (innate 2011.04) and realised my user
helper related code was broken in funny ways. As It appears it was
down to resolving the helper itself.
Apparently the helper module named UserHelper though the name given in
the namespace is stil 'user'. In 2010 versions the lines below matched
(i.e User and user as opposed to UserHeper and user)
When changing line 98 to 'User' from 'UserHelper' everything started
Could it be my setup that possibly messes somehow the resolution (due
to older gems) or is it a genuine bug?
(I'm still using Ruby 1.9.1p378, RubyGems 1.3.5, Rack 1.2.1 btw)
ps btw what is the safest way of updating Ramaze with all of it deps?
|Re: Ramaze 2011.07.25 User helper bug||Yorick Peterse||8/10/11 10:35 AM|
I've taken a quick look at the helper but I doubt this is the actual cause of
the problem. The reason the helper is named UserHelper and not User is because
the latter is a common name for models (and other general classes). I also think
that if this were to be an actual bug in Ramaze more people would've reported it
as the helper is quite popular as far as I can tell. Is it possible for you to
supply a small test case that reproduces the error?
About the upgrading, I personally think the safest way to upgrade Ramaze is to
do it in a separate RVM gemset and merge it once everything is working again. If
you're using a VCS similar to Git I also recommend doing it on a separate branch
so you can easily revert your changes.
|Re: Ramaze 2011.07.25 User helper bug||John||8/10/11 2:46 PM|
This is what I thought, but I can't argue with what I'm seeing over
here. The above line change fixed everything :-/
I sort of have the hunch that you are right, but I'd like to find out
really why so.
I think I better do that
btw is there an easy way to find out which helpers are loaded with
their respective load paths?
Well, there is no RVM here I'm afraid, just a server-wide Ruby
installation for all apps to use ;-(
and 'sudo gem update ramaze' doesn't seem to cut it I think.
|Re: Ramaze 2011.07.25 User helper bug||John||8/11/11 3:58 AM|
Indeed, you were right. I still can't figure out why this happened. I
retested it yesterday so may times and it was always the same problem
(the methods that the helper brought in eg., 'logged_in?' were not
being resolved thus leading to a method missing exception).
anyway, thanks again
|Re: Ramaze 2011.07.25 User helper bug||Yorick Peterse||8/11/11 5:14 AM|
So just to be sure, it's working again?
|Re: Ramaze 2011.07.25 User helper bug||John||8/17/11 3:57 AM|
> So just to be sure, it's working again?Yup, but I'm keeping an eye on the lot, because it was pretty damn