Skip to content
This repository has been 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

Open
eegilbert opened this issue Nov 30, 2012 · 4 comments

Comments

@eegilbert
Copy link

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?

@lureze
Copy link

lureze commented Feb 26, 2013

same here (except on debian wheezy)
thanks for the workaround, eegilbert

@swasher
Copy link

swasher commented Mar 9, 2013

same on ubuntu 12.10
thanks eegilbert, it's work

@adamclerk
Copy link

Works for me too

@jinnko
Copy link

jinnko commented Jun 10, 2013

On debian wheezy the paths are different. The following worked for me:

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

UPDATE: on another system, also running debian wheezy, however with the ruby1.9.3 package installed instead of the ruby1.9.1 package, the above paths didn't work. The updated paths that did work are:

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants