similar to: Why can't I define vars in caller's binding using eval?

Displaying 20 results from an estimated 20000 matches similar to: "Why can't I define vars in caller's binding using eval?"

2006 Nov 16
2
dynamically adding static (class) methods to a class
Hello again, I guess this is more of a Ruby question, but here goes anyways... I want to intercept all calls to non existent class methods and then call an existing class method with the non existent name. In code... class MyModel < ActiveRecord::Base def MyModel.method_missing(symbol, *args) MyModel.func(symbol.id2name) end def MyModel.func(func_called) puts "You
2008 Mar 11
6
saving an ActiveRecord without trigging the callbacks
Hello, How can I save an ActiveRecord without trigger before_save, after_save, etc? Thanks for the help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group,
2011 Aug 05
5
named context or calling include_context with block?
Hello, I''m playing around with Rspec again after going from test/unit to rspec then back to test/unit... :) Right off the bat, I find myself wanting to do something like this: https://gist.github.com/1128091 Basically, I want to name a context, then call it later by name, passing a block to it. Or in other words... what is the best way to DRY this code?
2006 Nov 09
2
help with join tables and has_and_belongs_to_many
Hi, I have a user model and a privilege model. They have the has_and_belongs_to_many relationship. Here are the model defs: class User < ActiveRecord::Base belongs_to :status has_and_belongs_to_many :privileges end class Privilege < ActiveRecord::Base has_and_belongs_to_many :users end Now I have a migration script to create the join table and populate a few users with some
2004 Apr 21
2
help with smbmount and permissions
ok, on my windows machine, i see: myname on 'computer01\home' (H:) so i went to my linux box and did: smbclient -L //computer01 -U myname and i see Home listed as a sharename (why does windows show it as "home" but its really "Home" as reported by smbclient?). well everything works fine if i mount it like this: smbmount //computer01/Home /mnt/computer01/Home -o
2001 Oct 04
2
"Access Denied" when trying to rename a file from win2k
hello, i'm new to samba, don't really know much besides getting the samba server up and running. i have redhat-7.1 running samba on one machine and i access my home from my win2k machine. i can listen to my mp3's, etc from win2k, but when i try to rename from win2k, i get the access denied message. also, in my mp3s dir, i can create a new file, edit/rename it, delete it, etc, but
2020 Apr 15
0
Re: [PATCH nbdkit 9/9] eval, sh: Define $nbdkit_safe_stdio = 0|1 in scripts.
On Wed, Apr 15, 2020 at 01:09:21PM -0500, Eric Blake wrote: > On 4/15/20 11:16 AM, Richard W.M. Jones wrote: > > In the subject, you describe $nbdkit_safe_stdio, but in the patch body... > > >--- > > plugins/eval/nbdkit-eval-plugin.pod | 11 +++-------- > > plugins/sh/nbdkit-sh-plugin.pod | 18 +++++++++++++++++- > > plugins/sh/call.c |
2020 Apr 15
1
Re: [PATCH nbdkit 9/9] eval, sh: Define $nbdkit_safe_stdio = 0|1 in scripts.
On 4/15/20 1:18 PM, Richard W.M. Jones wrote: > On Wed, Apr 15, 2020 at 01:09:21PM -0500, Eric Blake wrote: >> On 4/15/20 11:16 AM, Richard W.M. Jones wrote: >> >> In the subject, you describe $nbdkit_safe_stdio, but in the patch body... >> >>> --- >>> plugins/eval/nbdkit-eval-plugin.pod | 11 +++-------- >>> plugins/sh/nbdkit-sh-plugin.pod
2006 Jan 29
2
problem with xul/prototype experiment: "bind" method not found
Hi everyone, I was playing around with xul + prototype, and everything seemed to be going well until I ran into a wall - there seems to be some problem I can''t explain with Function.prototype.bind, for instance when I run this code: try { new Ajax.Request("http://localhost:3000/search/hello", { onComplete: this.onHelloComplete.bind(this) }); } catch
2010 Mar 16
1
hard to define
Hi all. I am trying to use debian package preseeding within my modules. Therefor I have created a preseed_package.pp like: define authentication::preseed_package ( $ensure ) { file { "/var/local/preseed/$name.preseed": source => "$module_path/files/$name.preseed", mode => 600, backup => false, require => File["/var/local/preseed"], } package {
2004 Apr 28
1
can't get into home dir share (username stuck on "guest")
i have my samba-2.2.7a setup to share home dirs as follows: [homes] browseable = yes writable = yes valid users = %S create mode = 0664 directory mode = 0775 the problem is that when logged on as a given user in windows, that user will see his/her home dir in "my network places", but when he/she tries to enter it, a dialog comes up prompting for a password only. the input field is
2006 Mar 28
1
Capistrano: env not setup properly over ssh
Hi, If I make a Capistrano task like task :test, :roles => :app do run "env" end It prints something completely different than if I just do ssh login@host env I need all my login scripts to run so all my environment vars (including PATH) are set. All my Capistrano tasks are failing because the paths are setup properly. Thanks for the help. -- Posted via
2012 Jul 05
2
[LLVMdev] clang optimizer does not remove unused/uneeded variables(and accesses) from global scope
addition to my last post: http://groups.google.com/group/llvm-dev/browse_thread/thread/afd85c3f303ec2a9 i know that using static on my globals will remove them - no other compilation unit can then extern the vars but my question is - in this closed szenario clang is "directly" producing the exe - isn't clang aware of that the vars are not in use? btw: the microsoft compiler
2011 Nov 01
2
Can't work with command prompt on Windows XP
Hi, collegues. I have installed Railsinstaller 2.0.0 and have a problem When I''m starting Command Prompt with Ruby and Rails I see the following text "The network path was not found. # Rails Environment Configuration. Your git configuration is incomplete. user.name and user.email are required for properly using git and services such as GitHub ( http://github.com/ ). Please
2020 Apr 15
2
Re: [PATCH nbdkit 9/9] eval, sh: Define $nbdkit_safe_stdio = 0|1 in scripts.
On 4/15/20 11:16 AM, Richard W.M. Jones wrote: In the subject, you describe $nbdkit_safe_stdio, but in the patch body... > --- > plugins/eval/nbdkit-eval-plugin.pod | 11 +++-------- > plugins/sh/nbdkit-sh-plugin.pod | 18 +++++++++++++++++- > plugins/sh/call.c | 8 ++++++-- > tests/test-single-sh.sh | 4 ++++ > 4 files changed, 30
2005 Sep 07
0
using Oracle bind vars in Rails
Has anyone looked into having ActiveRecord use Oracle bind vars? I don''t know if the same concept is supported in other dbs, but Oracle''s OCI driver supports late binding with dramatically improved performance. I did a quick test to confirm that I could expect the same performance improvement through the Ruby OCI8 driver, and in a simple test it looks to be a 5x improvement.
2003 May 14
7
some simple samba problems
hello, there are 3 problems i've been having with samba for a very long time. i was hoping to get them resolved once and for all. my smb.conf file is attached. 1) my printer is shared via samba and i'm using the cups print system. i can see the printer from my win2k and winxp machines, but it says "unable to connect, access denied". how do i remedy this problem? 2)
2012 Jun 20
1
Next generation WebM and FLAC
James Haigh <james.r.haigh at gmail.com> > Note that 50% is silly, lossless compression is asymptotic. I 2nd Martin, > once you have high-density entropy, there's little more 'air' to > squeeze-out. 10-20% would be worth it if it helps adoption, although it's > worth studying how close we already are to the asymptote of entropy. How > much would be saved? How
2011 Feb 09
2
puppet kick and "Could not set 'file on ensure: Is a directory - /var/lib/puppet/facts"
Hello puppet world, I''m sure this is probably an easy fix, but I cannot seem to resolve this issue. The puppetmaster starts correctly and so does the puppet agent, which receives the update correctly if I restart the puppet agent service manually or during the timed updates; however, if I perform an "puppet kick", it just fails with the following error: Triggering
2007 Sep 07
3
PDC (can't fetch domain SID)
os: debian etch 4.0 samba: 3.025c i am reading through the how-to (using samba 3rd ed), freely available btw at http://book.opensourceproject.org.cn/sysadmin/samba/sambao3rd/ i am interested in setting up a samba pdc for a good dozen windows xp pro clients. (i somehow could not wake up from the windows 2003 sbs nightmare). i have been able to join my debian box to the local windows domain and