search for: load_fil

Displaying 20 results from an estimated 115 matches for "load_fil".

Did you mean: load_file
2008 Jan 18
2
NameError when using alias_method -- but method exists?
Hello Rubyists, I am a bit stumped here. I want to extend the ''load_file'' method in the YAML module. Following along with the PickAxe example of making old methods do new things, I try this in irb: >> module YAML >> alias_method :orig_load_f, :load_file >> def load_file(*args) >> contents = orig_load_f(*args) >> content...
2006 Apr 13
4
Apache/fastcgi setup can''t find custom config/*.yml file!
.... file that I am attempting to load. What I can''t figure out is why it can''t find the file. Here''s the code that loads it in my controller: require ''yaml'' class ESimplyController < ApplicationController @@config = "" @@config = YAML.load_file("config/eSimplyConf.yml") This setup works fine in my development environment. When this code gets called, I get the following error in my test.log file: Errno::ENOENT (No such file or directory - config/eSimplyConf.yml): /usr/lib/ruby/1.8/yaml.rb:143:in `initialize''...
2007 Dec 28
3
Converting to Rails 2.0.2
...xross/rails/tastie_work/vendor/rails/activerecord/ lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'' from /Users/sxross/rails/tastie_work/vendor/rails/activerecord/ lib/../../activesupport/lib/active_support/dependencies.rb:203:in `load_file'' from /Users/sxross/rails/tastie_work/vendor/rails/activerecord/ lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'' from /Users/sxross/rails/tastie_work/vendor/rails/activerecord/ lib/../../activesupport/lib/active_support/dependencies.rb:2...
2016 Nov 04
4
[PATCH 0/2] improve Lua API for files and initramfs objects
...from files loaded via HTTP/TFTP in Lua. The documentation indicated that it should be possible (and I believe I did that in an older version). I implemented a few new functions to handle files/initramfs objects better. Changes: * NEW: file:data() returns file contents as a string * NEW: initramfs:load_file(filename, source, mode, do_mkdir) loads a file from source and add it an initramfs object * CHANGED: initramfs:add_file(filename, data, mode, do_mkdir) data can now also be a file loaded by loadfile(name) I've also changed the order of the do_mkdirs and mode arguments and change...
2016 Nov 10
3
[PATCH 0/2] improve Lua API for files and initramfs objects
Hi, > Ferenc W?gner <wferi at niif.hu>: > for reading configuration files from disk. Does it not work with HTTP/ > TFTP for you? Using that, load_file could be implemented in Lua as: that does work, yes. It just looked like a file object should have a some way to get the contents. I'm actually not using it in our scripts. > All in all, I can't see the need for new bindings for this task, but > maybe I miss something. At the sam...
2009 Mar 21
6
script/console: "no such file to load -- application.rb (MissingSourceFile)"
.../local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:382:in `load_without_new_constant_marking'': no such file to load -- application.rb (MissingSourceFile) from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:382:in `load_file'' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:381:in `load_file'' from /opt/local/lib/ruby/gems/1.8/...
2015 Jun 23
2
Call for testing: OpenSSH 6.9
...; char *cp; +#ifdef WITH_OPENSSL + BIGNUM *a, *b, *c; +#endif TEST_START("load passphrase"); pw = load_text_file("pw"); @@ -102,6 +104,7 @@ sshkey_file_tests(void) sshkey_free(k1); #endif +#ifdef WITH_OPENSSL TEST_START("parse RSA from private"); buf = load_file("rsa_1"); ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", "rsa_1", @@ -388,6 +391,7 @@ sshkey_file_tests(void) sshkey_free(k1); #endif /* OPENSSL_HAS_ECC */ +#endif /* WITH_OPENSSL */ TEST_START("parse Ed25519 from private"); buf = load_fil...
2009 Jul 01
1
Facter infinite looping on custom facts
...#39; from /apps/puppet/facter/lib/facter/util/ip.rb:48:in `get_interfaces'' from /apps/puppet/facter/lib/facter/interfaces.rb:20 from /apps/puppet/facter/lib/facter/util/loader.rb:72:in `load'' from /apps/puppet/facter/lib/facter/util/loader.rb:72:in `load_file'' from /apps/puppet/facter/lib/facter/util/loader.rb:38:in `load_all'' from /apps/puppet/facter/lib/facter/util/loader.rb:33:in `each'' from /apps/puppet/facter/lib/facter/util/loader.rb:33:in `load_all'' from /apps/puppet/facter/lib/...
2009 Apr 22
1
Tests for my gem cannot find classes in gems lib directory ..
...be Foo do end The error I get ./spec/Foo_spec.rb:1: uninitialized constant Foo (NameError) from /Library/Ruby/Gems/1.8/gems/rspec-1.2.4/lib/spec/runner/ example_group_runner.rb:15:in `load'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.4/lib/spec/runner/ example_group_runner.rb:15:in `load_files'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.4/lib/spec/runner/ example_group_runner.rb:14:in `each'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.4/lib/spec/runner/ example_group_runner.rb:14:in `load_files'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.4/lib/spec/runner...
2008 Sep 12
1
ArgumentError: Unknown key(s): dependant
...rc/rails_projects/project/app/models/album.rb:2 from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:203:in `load_file'' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:202:in `load_file'' from /usr/lib/ruby/gems/1...
2012 Jan 10
2
plug leaks in febootstrap
...17 00:00:00 2001 From: Jim Meyering <meyering at redhat.com> Date: Tue, 10 Jan 2012 16:55:49 +0100 Subject: [PATCH 1/2] helper: plug three small leaks * helper/ext2initrd.c (read_module_deps): Don't leak filename. (ext2_make_initrd): Don't leak "outfile". * helper/utils.c (load_file): Don't leak a file pointer. --- helper/ext2initrd.c | 4 +++- helper/utils.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/helper/ext2initrd.c b/helper/ext2initrd.c index dedc1e8..8b64e0f 100644 --- a/helper/ext2initrd.c +++ b/helper/ext2initrd.c @@ -1,5...
2011 Feb 06
1
Psych can't load LaTeX entities file
...=============================== #ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux] irb(main):001:0> Dir.pwd => "/opt/rubies/ruby-1.9.2-p136/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.3/lib/redcloth/formatters" irb(main):002:0> YAML => Psych irb(main):003:0> YAML.load_file("latex_entities.yml") Psych::SyntaxError: couldn''t parse YAML at line 182 column 9 from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in `parse'' from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'' from /opt/rubies/ruby-1....
2008 Mar 20
2
Anyone having problems with asset_host not getting set up right?
Hey All, I think I found a bug but I would be suprised since it would cause major problems. We setup the asset_host in init.rb with: if File.exist?(facebook_config) FACEBOOKER = YAML.load_file(facebook_config)[RAILS_ENV] ENV[''FACEBOOK_API_KEY''] = FACEBOOKER[''api_key''] ENV[''FACEBOOK_SECRET_KEY''] = FACEBOOKER[''secret_key''] ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = FACEBOOKER[''canvas_page_n...
2011 Jan 07
7
My external node classifier script is totally ignored
Hi, I just added an external classifier script, and things are not working as I expected to. Trying to read documentation about ext.nodes and searching the archives I couldn''t come up with any useful results. My classifier script outputs: --- YAML --- classes: - geodns::production::backend environment: production name: z01-06-02 parameters: puppet_server:
2007 Dec 12
3
undefined method: controller_name
...rs/application_controller_spec2.rb:9 from /Users/alvin/workspace/eTriever-spec-tmp/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:14:in `load'' from /Users/alvin/workspace/eTriever-spec-tmp/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:14:in `load_files'' from /Users/alvin/workspace/eTriever-spec-tmp/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:13:in `each'' from /Users/alvin/workspace/eTriever-spec-tmp/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:13:in `load_files''...
2006 Apr 11
2
class level "static" code in controller object not working
All, I have the following code that I put in my controller which I am using to initialize some static data. Note that it is not contained with a method of any kind. puts "test" config = YAML.load_file("config/config.yml") if config.nil? Dir.mkdir(config[''html_upload_folder'']) unless File.exist?(config[''html_upload_folder'']) I would like this code to only be executed ONCE when the controller class is loaded but what I am seeing is that every tim...
2009 Oct 08
0
autospec cannont find gems
...bygems/custom_require.rb:31:in `require'' ./spec/models/user_spec.rb:1 C:/INSTAN~3.0-W/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:15:in `load'' C:/INSTAN~3.0-W/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:15:in `load_files'' C:/INSTAN~3.0-W/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:14:in `each'' C:/INSTAN~3.0-W/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:14:in `load_files'' C:/INSTAN~3.0-W/ruby/lib/ruby/gems/1.8/gems/r...
2010 May 31
0
no such file to load -- /home/path/to/app/config/environment
...dencies.rb:510:in `require'' /home/app/helpers/spec_helper.rb:2 /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/ dependencies.rb:216:in `load_without_new_constant_marking'' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/ dependencies.rb:216:in `load_file'' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/ dependencies.rb:355:in `new_constants_in'' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/ dependencies.rb:215:in `load_file'' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/activ...
2007 Feb 21
3
Mongrel_Cluster PID File Creation Error.
...ssuming the file ends with ".pid" in my changes. Hope this helps. __ Donnie Jones svn diff Index: init.rb =================================================================== --- init.rb (revision 519) +++ init.rb (working copy) @@ -24,7 +24,7 @@ } conf = YAML.load_file(@config_file) @options.merge! conf if conf - @pid_file = @options["pid_file"].split(".") + @pid_file = @options["pid_file"].split(".pid") start_port = end_port = @only start_port ||= @options["port"].to_i...
2008 Sep 18
1
user_observer (restful_authentication) causes failure in loading rails
...from /source/communitysites/app/forums/models/post.rb:7 from /source/communitysites/vendor/rails/activesupport/lib/ active_support/dependencies.rb:216:in `load_without_new_constant_marking'' from /source/communitysites/vendor/rails/activesupport/lib/ active_support/dependencies.rb:216:in `load_file'' from /source/communitysites/vendor/rails/activesupport/lib/ active_support/dependencies.rb:355:in `new_constants_in'' from /source/communitysites/vendor/rails/activesupport/lib/ active_support/dependencies.rb:215:in `load_file'' from /source/communitysites/vendor/rails...