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

cannot load such file -- .../lib/engtagger/porter #20

Open
PeterHickman opened this issue Feb 12, 2024 · 2 comments
Open

cannot load such file -- .../lib/engtagger/porter #20

PeterHickman opened this issue Feb 12, 2024 · 2 comments

Comments

@PeterHickman
Copy link

This might be a me problem and nothing that you can solve but ... I installed engtagger on MacOS 14.2.1 but when requiring the gem I got the "cannot load such file" error for engtagger/porter

I have installed the gem with sudo so that might be the cause but all the files in the /Library/Ruby/Gems/2.6.0/gems/engtagger-0.4.0/lib/engtagger/ were marked as ".rw-------" and thus only readable by root. A quick chmod fixed it but all the other gems that I have installed with sudo have not had this problem despite having the same structure

Are the file permissions correct in this project?

@moracca
Copy link

moracca commented Apr 22, 2024

I ran into this issue as well. If you extract the gem contents from what is on ruby-gems the permission for the files inside lib/engtagger are incorrect (600). What is interesting however is that if you clone this repo and look at the permissions, they are correctly set to 644. If you run gem build engtagger.gemspec to build the gem, then extract it, the permissions are correct. So it seems something went wrong when this gem was last built and pushed to rubygems.

For now I'm working around it by pointing my Gemfile to the git repo instead of pulling the gem file

gem 'engtagger', github: 'yohasebe/engtagger', ref: 'master'

@yohasebe
Copy link
Owner

Thank you, @PeterHickman and @moracca, for bringing the file permission issues to my attention. I apologize for my late reply. I've updated the README file to address this issue:

  • The README now clearly recommends installing the gem without sudo to avoid permission problems. Using Ruby version managers like rbenv or rvm is encouraged for managing gems within your user environment.
  • For situations where sudo is unavoidable, the README now provides instructions on how to adjust file ownership after installation using the chown command. Additionally, a note is included to inform users about potential variations in the path based on their Ruby version and how to determine the correct path.
  • A troubleshooting section has been added to guide users on resolving permission-related errors.

Please feel free to open new issues if you encounter any further problems or have suggestions for improvement!

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

No branches or pull requests

3 participants