kputnam / stupidedi

Ruby API for parsing and generating ASC X12 EDI transactions
BSD 3-Clause "New" or "Revised" License
262 stars 137 forks source link

File permissions issue on v1.4.3 #272

Closed acimadamore closed 2 months ago

acimadamore commented 6 months ago

I'm having issues running the latest release(1.4.3) in a Docker container:

LoadError: cannot load such file -- /usr/local/bundle/ruby/3.2.0/gems/stupidedi-1.4.3/lib/stupidedi.rb

It seems to be a permissions problem in the lib/stupidedi.rb file:

$ ls -l /usr/local/bundle/ruby/3.2.0/gems/stupidedi-1.4.3/lib/stupidedi.rb
-rw------- 1 root root 1724 Jan 15 03:55 /usr/local/bundle/ruby/3.2.0/gems/...

I ran my application in a Docker container that does not use the root user for security reasons.

This is not an issue in 1.4.2, also if i install the gem using the GitHub repository and the ref v1.4.3 the files have the correct permission.

smathy commented 2 months ago

I confirmed this by grabbing the actual gem:

~/work/gems gem fetch stupidedi                                                                                                                                                                          8:11:56
Fetching stupidedi-1.4.3.gem
Downloaded stupidedi-1.4.3
~/work/gems tar xzf stupidedi-1.4.3.gem                                                                                                                                                                  8:12:13
~/work/gems tar tvzf data.tar.gz lib/stupidedi.rb                                                                                                                                                        8:12:26
-rw-------  0 wheel  wheel    1724 Sep 13  2023 lib/stupidedi.rb
kputnam commented 2 months ago

Thanks for pointing this out. I will look at it today.

kputnam commented 2 months ago

I pushed v1.4.5, which should have the correct permissions. Let me know if you still have problems, and thank you for bringing it to my attention in an email.

I realized I should be running gem build with the --strict flag, which will abort instead of only printing warnings.

smathy commented 2 months ago

Thanks

smathy commented 2 months ago

Hey @kputnam, I'm not actually seeing 1.4.5 on rubygems. Did you forget to gem push maybe?

smathy commented 2 months ago

Also, looks like you didn't merge 1.4.5 into master in GH, it's on a floating tag.

kputnam commented 2 months ago

Oops, you are right. I just pushed it now.

smathy commented 2 months ago

Disco, thanks again!

Petercopter commented 2 months ago

Sorry, offtopic here, hi @smathy! Small world, glad to see you! 🤗