Closed stevenhaddox closed 11 years ago
Try adding a newline to the end of the file. I think that's fixed on master
?
If it wouldn't be too much trouble, could you show me what your (sanitized for anything sensitive) config/support.toml
file looks like? Thanks!
It may be the trailing-newline bug like @jm said.
@jm @dirk: Literally the line that it output from cat:
$ cat config/support.toml
pub_key_path = "$HOME/id_dsa.pub"
I added in the newline to try it out and still got the same error. Thanks for working on this and for such fast responses ;)
@jm is there a way to point to a gem's git repo from within a gemspec? I don't know that one off-hand...
I don't think so but you can add extra deps to the Gemfile for testing maybe?
Okay. I'm unable to replicate this on master
with ruby 1.9.3p374. May have been fixed since v0.0.2.
@stevenhaddox: Unfortunately no. (Cite: StackOverflow)
@jm Want to bump it to v0.0.3 and push to Rubygems? There aren't any problems on master
HEAD to my knowledge.
Just pushed a new version; pull it down and give it a shot!
@jm @dirk: thanks. I'll follow-up momentarily.
Apparently I'm really good at breaking things...
SUPPORT (centos_chef_solo) $ bundle show toml
Resolving dependencies...
/Users/steven/.rvm/gems/ruby-1.9.3-p392/gems/toml-0.0.3
SUPPORT (centos_chef_solo) $ cat config/support.toml
pub_key_path = "$HOME/id_dsa.pub"
SUPPORT (centos_chef_solo) $ b ruby -e "require 'toml';TOML.load('config/support.toml');"
Failed to match sequence (ALL_SPACE (KEY_GROUP / KEY_VALUE / COMMENT_LINE){0, } ALL_SPACE) at line 1 char 1.
`- Don't know what to do with "config/sup" at line 1 char 1.
/Users/steven/.rvm/gems/ruby-1.9.3-p392/gems/toml-0.0.3/lib/toml/parser.rb:21:in `initialize': undefined method `each' for nil:NilClass (NoMethodError)
from /Users/steven/.rvm/gems/ruby-1.9.3-p392/gems/toml-0.0.3/lib/toml.rb:20:in `new'
from /Users/steven/.rvm/gems/ruby-1.9.3-p392/gems/toml-0.0.3/lib/toml.rb:20:in `load'
from -e:1:in `<main>'
SUPPORT (centos_chef_solo) $ b ruby -e "require 'toml';TOML::Parser(\"key='value'\").parsed;"
-e:1:in `<main>': undefined method `Parser' for TOML:Module (NoMethodError)
Also, there's quite a few gems in this project. I'm going to try it in a blank gemset and see if it makes a difference there...
Ah. You're going to want to do TOML.load_file
instead of TOML.load
(load
expects a string to be parsed). Also, do TOML::Parser.new(...).parsed
(just need that pesky little .new
in there). Hope that works!
@dirk: do'h. I could've sworn I had that right. #fail
Thanks. Seems to work awesome now (even without the extra newline). Sorry if I cause a release over a mental parsing error :confounded:
No worries! Glad to help. :smile: