igor-makarov / xcake

:cake: Describe Xcode projects in a human readable format and (re)generate one on demand.
MIT License
634 stars 48 forks source link

cannot load such file -- Xcodeproj (LoadError) #170

Closed vitorventurin closed 7 years ago

vitorventurin commented 7 years ago

I've got this error:

xcake make /Users/Rotiv/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- Xcodeproj (LoadError) from /Users/Rotiv/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /Users/Rotiv/.rvm/gems/ruby-2.4.0/gems/xcake-0.8.9/lib/xcake/xcodeproj_ext/PBXGroup.rb:1:in <top (required)>' from /Users/Rotiv/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /Users/Rotiv/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require' from /Users/Rotiv/.rvm/gems/ruby-2.4.0/gems/xcake-0.8.9/lib/xcake.rb:9:in<top (required)>' from /Users/Rotiv/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/Rotiv/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:inrequire' from /Users/Rotiv/.rvm/gems/ruby-2.4.0/gems/xcake-0.8.9/bin/xcake:3:in <top (required)>' from /Users/Rotiv/.rvm/gems/ruby-2.4.0/bin/xcake:22:inload' from /Users/Rotiv/.rvm/gems/ruby-2.4.0/bin/xcake:22:in <main>' from /Users/Rotiv/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:ineval' from /Users/Rotiv/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `

'

:(

RikkiGibson commented 7 years ago

Not sure what to make of it. Did you poke around to see if Xcake's dependencies installed correctly? Did you install Xcake using gem or some other means?

jcampbell05 commented 7 years ago

@RikkiGibson whats your rubygem email btw, I'm gunna add you to it as an author.

vitorventurin commented 7 years ago

@RikkiGibson Yes. I've installed via gem (using RVM and ruby 2.4.0). That's really weird.

RikkiGibson commented 7 years ago

@jcampbell05 It's rikkigibson [at] gmail [dot] com

jcampbell05 commented 7 years ago

@RikkiGibson you should be added so you can push versions up :)

earien commented 7 years ago

@RikkiGibson @vitorventurin @jcampbell05 I had the same problem, it is due to the import in the lib/xcake/xcodeproj_ext/PBXGroup.rb file. Changing it to require 'xcodeproj' instead of require 'Xcodeproj' fixed my problem: probably this works anyway on case insensitive systems, so that it was hard to reproduce.

jcampbell05 commented 7 years ago

@earien cool, I guess we should add this to our linting tests.

RikkiGibson commented 7 years ago

Does that mean if you use hfs case sensitive on your mac you'd trigger the issue?

earien commented 7 years ago

@RikkiGibson basically you won't notice the issue if you are using a case insensitive filesystem, whilst it will fail on a case sensitive one. We should fix the import in the lib/xcake/xcodeproj_ext/PBXGroup.rb file, as actually the correct name of the library is lowercased: require 'xcodeproj'.