23 Jul '12, 10am

uninitialized stream (IOError) - Ruby Forum

So I'm getting an unexpected IOError in my code. class ConfigStub < File def initialize(location) unless filename = location.gsub("/", "_") raise ArgumentError, INVALID_LOCATION_FORMAT end @stub = File.open(CONFIG_PATH + filename, "w+") # This might need to be more sophisticated depending on the rule end # initialize end # ConfigStub class class Directive def initialize(location) @sanity_checker = SanityChecker.new() @config_stub = ConfigStub.new(location) @directive = ["<Location #{location}>"] @config_stub.each do |line| @directive << line end end # initialize . . . end # Directive class When it goes to execute the @config_stub.each do |line| section I get the following error: in `each': uninitialized stream (IOError) My Ruby version is as follows: ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux] What am I missing? -Glen -- "Hey brother Christian with your high an...

Full article: http://www.ruby-forum.com/topic/191600

Tweets

Ruby on Rails Guides (edge) - #rails #ruby

edgeguides.rubyonrails.org 23 Jul '12, 10am

Ruby on Rails Guides (580fa0c) These are Edge Guides , based on the current master branch. If you are looking for the ones...

How to get the directory of the current script?...

ruby-forum.com 22 Jul '12, 11am

> File.dirname(__FILE__) will give you the current file's path. The current file may be accessed with a relative path. If ...

Ruby in 20 Minuten:

ruby-lang.org 28 Jul '12, 9pm

Was ist gerade passiert? Haben wir etwa gerade das kürzeste “Hallo, Welt!”-Programm der Welt geschrieben? Nun, nicht direk...

javaparse (0.0.7): Get info from Java files

rubygems.org 22 Jul '12, 5pm

javaparse 0.0.4 Get info from Java files with Ruby install gem install javaparse Download Documentation Subscribe Stats Au...

synack (1.2.0): A Ruby server for terminal-noti...

rubygems.org 29 Jul '12, 1am

synack 1.0.0 A Ruby server for terminal-notifier install gem install synack Download Documentation Subscribe Stats Authors...

Status: Resolved / ONLINE MT @bitcoinstatus: Th...

bitcointalk.org 31 Jul '12, 7am

General discussion about the Bitcoin ecosystem that doesn't fit better elsewhere. News, the Bitcoin community, innovations...