Loading...
i was trying to build a rails plugin. my project was in different directory so i symlinked the directory under “vendor/plugins/..”. but i couldn’t find it working.
so after passing few times, i could successfully run my plugin under rails 2.0-RC2. so later i compared lookup.rb file from the 1.5 and 2.0-RC2 release.
the defecting code was the following lines - (1.5)
def use_component_sources!
# ….
sources < < PathSource.new(:lib, "#{::RAILS_ROOT}/lib/generators")
sources << PathSource.new(:vendor, "#{::RAILS_ROOT}/vendor/generators")
sources << PathSource.new(:plugins, "#{::RAILS_ROOT}/vendor/plugins/**/generators")
# ....
end
the fixed version - (2.0-RC2)
def use_component_sources!
# …sources < < PathSource.new(:lib, "#{::RAILS_ROOT}/lib/generators")
sources << PathSource.new(:vendor, "#{::RAILS_ROOT}/vendor/generators")
sources << PathSource.new(:plugins, "#{::RAILS_ROOT}/vendor/plugins/*/**/generators")
sources << PathSource.new(:plugins, "#{::RAILS_ROOT}/vendor/plugins/*/**/rails_generators")
end
# ...
end
i also checked out rails bug tracker i found a bug was pointed to this issue and apparently which was fixed on the following change set.
http://dev.rubyonrails.org/changeset/6101
yesterday, i had a pretty rough working day, i was stucked (along with my team) with some simple joining. we had the following models -
Attribute
———–
class Attribute < AR:B
belongs_to :category
end
class AttributeValue < AR:B
belongs_to :item
belongs_to :attribute
end
class Item < AR:B
has_many :attribute_values
has_many :attributes, :through => :attribute_values
end
rails wasn’t giving much better error message, instead it was saying, “invalid type, String to Integer..”, so far i understood ActiveRecord stuff was trying to cast a string to integer.
we even didn’t know which field was doing this stupidity and so on…
so later we dug down to the rails scripts, we added few debug messages. we found “[]” was invoked to set “id” string value.
anyway, after digging more into to this issue, today i gave another try after 7 hours of nice sleep. it was about rails reserve words.
though i heard something from the rails community, but i was expecting some message or errors which explain this issue.
anyway, i always like fail first approach. if something is not possible it should fail first. at least it should return a meaningful exception.
i believe Active Record should be patched with more clear warning or exception, if any reserved word is used for model or controller or others it should let us inform
.
This post is to remind myself about a bug on Firefox 1.5.
bug details:
Http ajax request doesn’t invoke “onstatechange” handler if ajax request type is set to sync.
how to resolve this problem:
invoke “onstatechange” function manually.
I was stuck with few CSS related bugs, which were related only with M$ IE.
Credits goes to hasin bhai who resolved those M$ IE related bugs.
Scenario 1:
Everything was loading fine on most of the browsers except IE 6, it was not render the <h2/> background, which was placed inside a div.
i.e: <div><h2>title</h2><p>some content</p></div>
Solution: use (position: relative)
Scenario: 2
Rectangle border was not rendering properly on IE.
i.e: <div class=”borderDiv”>some content, contains lot of floating div as well</div>Solution: use (background: #fff);
i was trying to create a project for more than 30 minutes… but could not get it done…
it was again and again returning the same error page…

** Last update: i could make it







| www.flickr.com |
Leave a reply