Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method `red' #374

Closed
vincentisambart opened this issue May 23, 2016 · 2 comments · Fixed by #449
Closed

NoMethodError: undefined method `red' #374

vincentisambart opened this issue May 23, 2016 · 2 comments · Fixed by #449

Comments

@vincentisambart
Copy link
Contributor

require "xcodeproj"
begin
  Xcodeproj::Plist.read_from_path("not-existing-file")
rescue => e
  p e.message
end

Running the code above give the following error:

[...]/gems/xcodeproj-1.0.0/lib/xcodeproj.rb:11:in `message': undefined method `red' for "[!] The plist file at path `not-existing-file` doesn't exist.\n":String (NoMethodError)
    from test.rb:5:in `rescue in <main>'
    from test.rb:2:in `<main>'

.red is used in lib/xcodeproj.rb even though colored is only required when Xcode::Command is autoloaded.

@segiddins
Copy link
Member

Looks like we should just require 'colored' in xcodeproj.rb then?

@vincentisambart
Copy link
Contributor Author

That should do the trick 😄

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

Successfully merging a pull request may close this issue.

2 participants