quirkey / static_model

ActiveRecord like functionalities for reading from YAML with a simple class implementation
http://quirkey.rubyforge.org/static_model
MIT License
61 stars 11 forks source link

Error starting app: `join': can't convert nil into String (TypeError) #1

Closed pushred closed 13 years ago

pushred commented 13 years ago

Hi there,

Does static_model support Rails 3.x? I get the following error when I try starting my app on my OSX machine:

/Library/Ruby/Gems/1.8/gems/static_model-0.3.0/lib/static_model/rails.rb:4:in `join': can't convert nil into String (TypeError)
    from /Library/Ruby/Gems/1.8/gems/static_model-0.3.0/lib/static_model/rails.rb:4
    from /Library/Ruby/Gems/1.8/gems/static_model-0.3.0/lib/static_model.rb:18:in `require'
    from /Library/Ruby/Gems/1.8/gems/static_model-0.3.0/lib/static_model.rb:18
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler.rb:120:in `require'
    from /Volumes/Macintosh HD/Users/eric/Projects/satay/config/application.rb:7
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:28:in `require'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:28
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:27:in `tap'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:27
    from script/rails:6:in `require'
    from script/rails:6

This is using Ruby 1.8.7 / Rails 3.0.9 with RVM. I get a similar error in Ubuntu with 3.0.7 and no RVM.

quirkey commented 13 years ago

it seems that this is an issue with Rails.root returning nil - looking into what works with Rails 3.

quirkey commented 13 years ago

Actually, I should ask - what did you run to get this error?

pushred commented 13 years ago

Just running WEBrick with rails server, unicorn returns a shorter ^C#<TypeError: can't convert nil into String> error. Thanks for taking a look!

quirkey commented 13 years ago

Sorry it took so long, this should be fixed in the 1.0 release.

pushred commented 13 years ago

Sweet, thank you! Will try it out in a project soon.

shahdhiren commented 10 years ago

Hi,

I am still facing this issue on MAC OS 10.9.5 with Cocoapods version 0.34.2.

Specific Case: While running the pod install command in pre-Action in BOT within OS X Server then I am getting below error:

   /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.2/lib/cocoapods/config.rb:23:in `join': no implicit conversion of nil into String (TypeError)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.2/lib/cocoapods/config.rb:23:in `<class:Config>'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.2/lib/cocoapods/config.rb:4:in `<module:Pod>'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.2/lib/cocoapods/config.rb:1:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.2/lib/cocoapods.rb:22:in `<module:Pod>'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.2/lib/cocoapods.rb:17:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.2/bin/pod:32:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'

WARNING: CocoaPods requires your terminal to be using UTF-8 encoding. See https://github.com/CocoaPods/guides.cocoapods.org/issues/26 for possible solutions.

Is there any workaround to solve this?? I have logged config.rb file and I found ENV['HOME'] value is coming NIL.