ErwinM / acts_as_tenant

Easy multi-tenancy for Rails in a shared database setup.
MIT License
1.53k stars 263 forks source link

Remove sqlite installation step #245

Closed artplan1 closed 3 years ago

artplan1 commented 3 years ago
artplan1 commented 3 years ago

seems like bundle cache is filling, but no results on unpack 🤔

or it caches/unpacks vendor/bundle instead of gemfiles/vendor/bundle

excid3 commented 3 years ago

Looks like you got it working now?

artplan1 commented 3 years ago

Looks like you got it working now?

something is wrong with cache/bundler paths in ruby/setup-ruby with custom gemfile path

excid3 commented 3 years ago

Oh yeah, I saw the tests passing and though it was fixed. 😅

I just tried a change to move it to the job's env. May or may not work. We shall see.

excid3 commented 3 years ago

Seems like it's still installing the gems again. Maybe that is because it isn't caching them separately and they override each other?

artplan1 commented 3 years ago

I assume it caches vendor/bundle relative to project root, but path to gemfiles in set relative to Gemfile's path, which is gemfiles. I'll check action code locally/my fork to see paths

artplan1 commented 3 years ago

@excid3 setting BUNDLE_PATH_RELATIVE_TO_CWD helps. now it installs gems to ./vendor/bundle, instead of ./gemfiles/vendor/bundle and cache works ok.

I've submitted issue with proposal to fix this in ruby/setup-ruby - https://github.com/ruby/setup-ruby/issues/131

excid3 commented 3 years ago

Awesome, thanks for doing all that digging!

artplan1 commented 3 years ago

image

🚀

excid3 commented 3 years ago

Blazing fast! 🔥

artplan1 commented 3 years ago

I've submitted issue with proposal to fix this in ruby/setup-ruby - ruby/setup-ruby#131

they fixed it using absolute paths - https://github.com/ruby/setup-ruby/issues/131 BUNDLE_PATH_RELATIVE_TO_CWD env var can be removed