settingslogic
settingslogic copied to clipboard
TypeError on .new() - can't convert Symbol into String
Trying to use Settingslogic to open an arbitrary file for settings, and getting this error (from console):
eliot:ResumeEverywhere scott$ rails console
Loading development environment (Rails 3.0.7)
ruby-1.9.2-p290 :001 > s = Settings.new(:application)
TypeError: can't convert Symbol into String
from /usr/local/rvm/gems/ruby-1.9.2-p290@rails-3/gems/settingslogic-2.0.6/lib/settingslogic.rb:105:in `read'
from /usr/local/rvm/gems/ruby-1.9.2-p290@rails-3/gems/settingslogic-2.0.6/lib/settingslogic.rb:105:in `initialize'
from (irb):1:in `new'
from (irb):1
from /usr/local/rvm/gems/ruby-1.9.2-p290@rails-3/gems/railties-3.0.7/lib/rails/commands/console.rb:44:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p290@rails-3/gems/railties-3.0.7/lib/rails/commands/console.rb:8:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p290@rails-3/gems/railties-3.0.7/lib/rails/commands.rb:23:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Using Rails 3.0.7, settingslogic 2.0.6, and this code in model/settings.rb:
class Settings < Settingslogic
namespace Rails.env
end