Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Symlink to gem dir instead of ./cache #123

Closed
hkdobrev opened this issue Sep 25, 2014 · 4 comments
Closed

Symlink to gem dir instead of ./cache #123

hkdobrev opened this issue Sep 25, 2014 · 4 comments
Labels

Comments

@hkdobrev
Copy link

I (think) have a problem with how this (gorgeous) plugin caches Ruby gems.

Have a look at:

gem_cache_path = "#{gemdir_path}/cache"

At the moment it symlinks the gem cache dir /tmp/vagrant-cache/gem/<ruby version> to <gem path>/cache.

Why not symlink the cache dir directly to <gem dir>?

My problem resides in that everything works, but when try to provision offline it doesn't find the gems even if they are previously cached.

Any help is appreciated! Thank you for your work!

@fgrehm
Copy link
Owner

fgrehm commented Sep 25, 2014

To be very honest with you I'm not 100% sure why it is like that since it was one of the very first buckets I wrote, but I believe it was somehow by design since all buckets are about caching the downloaded tarballs and not the extracted files themselves.

If you really want that behavior you might want to use the generic cache bucket pointing it to the right path and disable the automatic bucket detection (unfortunately we can't blacklist just the gems bucket autodetection ATM).

Does that help?

@hkdobrev
Copy link
Author

unfortunately we can't blacklist just the gems bucket autodetection ATM

I do not understand what do you mean with that. If you remove /cache from the code I've referenced above, wouldn't it work as well?

all buckets are about caching the downloaded tarballs and not the extracted files themselves

I get that, but in the <gem dir>/cache directory I have .gem files.

you might want to use the generic cache bucket pointing it to the right path and disable the automatic bucket detection

I'll try that, thanks!

P.S. I'm not very familiar with Ruby and Gems so forgive me if I'm getting something completely wrong.

@fgrehm
Copy link
Owner

fgrehm commented Oct 6, 2014

unfortunately we can't blacklist just the gems bucket autodetection ATM

Sorry, this means that we currently can't tell vagrant-cachier that we want to disable automatic detection for a specific bucket. You'd probably want that since you want to configure things in a different way :-)

I do not understand what do you mean with that. If you remove /cache from the code I've referenced above, wouldn't it work as well?

It might, but the behavior of that bucket would be different from the others we have around because we would be caching all of the gems sources instead of just the tarballs.

all buckets are about caching the downloaded tarballs and not the extracted files themselves

I get that, but in the /cache directory I have .gem files.

Yeah, .gems are the compressed sources of Ruby Gems (kinda like a tarball :-P)

@fgrehm fgrehm added the ignored label Nov 22, 2022
@fgrehm
Copy link
Owner

fgrehm commented Nov 22, 2022

Hey, sorry for the silence here but this project is looking for maintainers 😅

As per #193, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue 👋

@fgrehm fgrehm closed this as completed Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants