kyrylo / pry-theme

An easy way to customize Pry colors via theme files
zlib License
171 stars 14 forks source link

During boot: can't convert nil into String (TypeError) #19

Closed tangledhelix closed 12 years ago

tangledhelix commented 12 years ago

I know this error was addressed in kyrylo/pry-theme#4, but the fix does not work in my situation. When I boot servers, they start the puppet daemon, which loads rubygems (including, in my case, pry-theme 0.1.1). Then I get this error:

Starting Red Hat Network Daemon: [  OK  ]
Starting rhsmcertd 240 1440[  OK  ]
Starting puppet: Error loading RubyGems plugin "/usr/lib/ruby/gems/1.8/gems/pry-theme-0.1.0/lib/rubygems_plugin.rb": can't convert nil into String (TypeError)
[  OK  ]

Puppet works, but I keep getting asked about this, so it would be great if the error could go away someday.

I believe the trouble here is that when running /sbin/service, or during bootup (which will run /sbin/service to start puppet and other services), $HOME is not set, and pry-theme is not happy about that. I've tried a few things in my local setup but so far nothing I tried has worked, so unfortunately I don't have a pull request to go with this report.

kyrylo commented 12 years ago

Hello! Thanks for posting this issue.

I just pushed v0.1.2. Could you try out that version?

tangledhelix commented 12 years ago

How do I build this from the source? The gem servers still show 0.1.1 as far as I can tell, so gem update doesn't work.

kyrylo commented 12 years ago

Oops, I forgot to push it to RubyGems. Just do gem install pry-theme again.

tangledhelix commented 12 years ago

Works great, thanks :-)