From: Hassan Schroeder Date: 2013-06-17T04:10:12+09:00 Subject: Re: Issue in reading data from yaml file On Sun, Jun 16, 2013 at 11:43 AM, Rochit Sen wrote: > require 'yaml' > data = YAML.load('config.yml') > @path = data["logfile"] > puts @path > > But this is not showing anything in console, just blank. What would be > the way to read from the values in a yaml file? If you (ahem) read the docs, YAML.load works on strings, not files, so e.g. data = YAML.load(File.read('config.yml')) HTH, -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan