fixed for osx system ruby and nil