Skip to content
This repository was archived by the owner on Aug 3, 2020. It is now read-only.
This repository was archived by the owner on Aug 3, 2020. It is now read-only.

psych.rb:297:in `initialize': no implicit conversion from nil to integer (TypeError) #122

@eegilbert

Description

@eegilbert

I see this currently with visage-app on Ubntu server 12.10.

psych (1.3.4)
bundler (1.2.2)

/usr/lib/ruby/1.9.1/psych.rb:297:in initialize': no implicit conversion from nil to integer (TypeError)
from /usr/lib/ruby/1.9.1/psych.rb:297:inopen'
from /usr/lib/ruby/1.9.1/psych.rb:297:in load_file'
from /var/lib/gems/1.9.1/gems/visage-app-2.1.0/lib/visage-app/config/file.rb:33:inload'
from /var/lib/gems/1.9.1/gems/visage-app-2.1.0/lib/visage-app/profile.rb:25:in load'
from /var/lib/gems/1.9.1/gems/visage-app-2.1.0/lib/visage-app.rb:38:inblock in class:Application'
from /var/lib/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1273:in configure'
from /var/lib/gems/1.9.1/gems/visage-app-2.1.0/lib/visage-app.rb:30:inclass:Application'
from /var/lib/gems/1.9.1/gems/visage-app-2.1.0/lib/visage-app.rb:19:in module:Visage'
from /var/lib/gems/1.9.1/gems/visage-app-2.1.0/lib/visage-app.rb:18:in'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from /var/lib/gems/1.9.1/gems/visage-app-2.1.0/bin/visage-app:17:in <top (required)>'
from /usr/local/bin/visage-app:23:inload'
from /usr/local/bin/visage-app:23:in `'

After trudging through these I have an empy yaml file that visage is trying to open:

-rw-r--r-- 1 root root 0 Nov 29 21:28 /var/lib/gems/1.9.1/gems/visage-app-2.1.0/lib/visage-app/config/profiles.yaml

Even when removing this file visage still fails to start until I copy the default profile.yaml over to the one that's empty:

cp /var/lib/gems/1.9.1/gems/visage-app-2.1.0/features/support/config/default/profiles.yaml /var/lib/gems/1.9.1/gems/visage-app-2.1.0/lib/visage-app/config/profiles.yaml

I had posted this over on the Bundler thread too. It seems like the consensus is psych doesn't handle empty files very well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions