Displaying 20 results from an estimated 200 matches similar to: "alias_method_chain stack level too deep in Rake test only"
2018 Apr 30
0
[PATCH 3/4] common/qemuopts: use the old pointer as realloc pointer
Call realloc() directly with the pointer to the old data, instead of
assigning it to the destination variable, and using that one. The rest
of the code is the same, already properly checking for the results of
realloc(), so this mostly help static code analyzers.
---
common/qemuopts/qemuopts.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/common/qemuopts/qemuopts.c
2018 Dec 21
1
[nbdkit PATCH] connections: Don't use uninit memory on early client EOF
Fuzzing with afl found a bug where a 27 byte client sequence
can cause nbdkit to report a strange error message:
$ printf %s $'000\1IHAVEOPT000\6'$'000\7'$'000\1x00' | tr 0 '\0' |
./nbdkit -s memory size=1m >/dev/null
nbdkit: memory: error: client exceeded maximum number of options (32)
The culprit? The client is hanging up on a message boundary,
so
2017 Apr 27
4
[PATCH 0/4] common: Add a simple mini-library for handling qemu command and config files.
Currently we have an OCaml library for generating the qemu command
line (used only by ‘virt-v2v -o qemu’). However we also generate a
qemu command line in ‘lib/launch-direct.c’, and we might in future
need to generate a ‘-readconfig’-compatible configuration file if we
want to go beyond 10,000 drives for scalability testing.
Therefore this patch series reimplements the qemu command line code as
2018 Nov 29
2
[nbdkit PATCH] connections: Implement NBD_OPT_INFO
qemu is about to add 'qemu-nbd --list', which exercises NBD_OPT_LIST
and NBD_OPT_INFO to give the user as much detail as possible about
an export without actually connecting to it. For that to display
more than the export name when nbdkit is the server, we need to
implement NBD_OPT_INFO. Thankfully, the NBD spec intentionally
made the command very similar to NBD_OPT_GO, to the point that
2007 Apr 12
0
Does Ferret have problems with #alias_method_chain ?
Hi all,
I have this in my class:
class Party < AR::B
acts_as_ferret :store_class_name => true, :remote => true,
:fields => (self.content_columns.map(&:name) rescue []) +
%w(main_identifier)
class << self
# #count is also defined, omitted for clarity
def find_with_destroyed_scope(*args)
with_destroyed_scope do
2006 Aug 16
0
acts_as_paranoid and alias_method_chain
when i require acts_as_paranoid I''m getting: undefined method
`alias_method_chain'' for #<Class:ActiveRecord::Base> (NoMethodError)
It happens in acts_as_paranoid''s init.rb. here''s the whole file. the
alias_method_chain is near the bottom. please advise.
class << ActiveRecord::Base
def belongs_to_with_deleted(association_id, options = {})
2007 Mar 22
0
`alias_method_chain': undefined method `find' for class `ActiveRecord::Base' (NameError)
I can''t seem to be able to override the :find method in the model base
class, for example, in /lib/usermonitor.rb:
module ActiveRecord
module UserMonitor
def self.included(base)
base.class_eval do
alias_method_chain :find, :user
def current_site
Thread.current[:user]
end
end
end
def find_with_user(*args)
...
end
end
2009 Jan 20
0
alias_method_chain in Facebooker Causing Stack Level Too Deep
I installed the Facebooker plugin and upon placing it on a staging server, I
keep running into stack level too deep errors. It seems to stem from
Facebooker using alias_method_chain to override some of the
ActionController methods. I believe it''s getting loaded twice causing
confusion. I''ve tried various methods include wrapping a unless
respond_to?(:method) around the
2010 Jul 23
0
alias_method_chain with i18n
Hello,
I was investigating solutions for i18n with will_paginate and I found
a possible solution at http://lawrencesong.net/2009/01/enable-i18n-in-will_paginate-plugin/
The author adds to application_helper.rb the following code:
#############################################
include WillPaginate::ViewHelpers
def will_paginate_with_i18n(collection, options = {})
2007 Jun 12
1
alias_method_chain and Class methods (a Ruby question)
Hello list,
I am trying to override the post_form method of Net::HTTP so that it
does something before actually doing the post. I tried the following
in environments/development.rb
module Net
class HTTP
alias_method_chain :post_form, :intercept
def post_form_with_intercept(url, params)
# Do something before post
logger.info(''About to post at
2008 Mar 28
1
undefined method ''alias_method_chain''
Running Rails 2.0.2, I get this error:
./script/../config/../vendor/plugins/facebooker/lib/facebooker/rails/facebook_url_rewriting.rb:29:
undefined method `alias_method_chain'' for
ActionController::UrlRewriter:Class (NoMethodError)
from /usr/local/rubygems/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
from
2006 Dec 26
0
alias_method_chain vs. redefined method with super
I''m trying to fully understand the subtleties of using
alias_method_chain to refine method behavior versus redefining a method
and calling super. I have a simple data model (a music collection) that
I often use to evaluate web frameworks, and I''m trying to get it working
on Rails 1.2.0RC1.
Specifically, I have three classes which subclass a common Artist class:
- Band
2009 Oct 21
3
alias_method_chain and ActiveSupport::TestCase
I''m trying to add some functionality to the setup method of all my
tests.
I added a method called setup_with_ts in the test_helper and chained
it using alias_method_chain :setup, :ts and that works great for every
test that does not define setup in the test.
So for my unit tests i tried also defining the same method
setup_with_ts in a
class ActiveSupport::TestCase
def setup_with_ts
2009 Dec 29
1
undefined method `alias_method_chain' for I18n::Backend::Simple:Class
Hi,
We are running RE:
ruby 1.8.7 (2009-06-12 patchlevel 174) [sparc-solaris2.10], MBARI
0x8770, Ruby Enterprise Edition 2009.10
I tried a simple web app with a controller rendering a text and is
working in my PC but on the server I get:
Error message:
undefined method `alias_method_chain'' for
I18n::Backend::Simple:Class
Exception class:
NoMethodError
Application root:
2008 Jun 12
1
unidirectional belongs_to polymorphic
The setup:
class Location::Base < ActiveRecord::Base
set_table_name :locations
...
end
class Location::Address < Location::Base
...
end
class Location::Airport < Location::Base
...
end
class Person < ActiveRecord::Base
belongs_to :location, :polymorphic => true, :class_name =>
"Location::Base"
...
end
I want a unidirectional belongs_to relationship. That
2008 Jan 02
1
assert_recognizes with requirements => {:method => something}
I''m having trouble with my routing, and was wondering if anyone else
had seen something similar.
I''ve got these two routes:
map.login ''/login'', :controller => ''sessions'', :action =>
''new'', :requirements => { :method => :get }
map.connect ''/login'', :controller => ''sessions'',
2007 Feb 21
6
Problem with url_for and https - overrides all options
I have a piece of code like this in one of my views:
<%=link_to "link here", :action=>''my_action'', :id=>1 %>
It works fine on my local development machine, running Webrick over http
and it works fine on my testing server which is running single mongrel
instance behind Apache 1.3 as a proxy. On both the outcome link is this:
<a
2006 Mar 12
2
Strange error: undefined method `rewrite''
Hi,
when I generate a new rails project with a simple scaffolded controller,
I get a strange error message, whenever it tries to call the url_for
method, for example:
,----
| undefined method `rewrite'' for #<Url:0xb7675e64>
|
| Extracted source (around line #7):
|
| 4: </p>
| 5: <% end %>
| 6:
| 7: <%= link_to ''Edit'', :action =>
2005 Dec 31
6
habtm recursion via destroy_without_callbacks
I am having a problem with two models that each have a HABTM
relationship to the other. For example:
CREATE TABLE people (id INT, name TEXT);
CREATE TABLE teams (id INT, name TEXT);
CREATE TABLE people_teams (person_id INT, team_id INT);
The person model has:
has_and_belongs_to_many :teams
And the team model has:
has_and_belongs_to_many :people
The trouble comes when trying to destroy
2019 Sep 24
0
[PATCH nbdkit 3/4] common/protocol: Update nbd-protocol.h so it matches libnbd’s copy.
Diff against libnbd’s copy of this file, and change this one until it
matches.
---
common/protocol/nbd-protocol.h | 76 +++++++++++++++++-----------
server/protocol-handshake-newstyle.c | 26 +++++-----
server/protocol-handshake-oldstyle.c | 4 +-
server/protocol.c | 25 ++++-----
tests/test-layers.c | 14 ++---
5 files changed, 81 insertions(+), 64