-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unable to bundle on Windows 10 because of a symlink. #1693
Comments
In #1514, we added a symlink so that the docs would show up on the demo app (which, ironically, you can't see as I never deployed that version) …but symlinks aren't supported on Windows so hence we're getting this error. There's two potential solutions I can think of here:
To do that, we'd still need to solve the intention of #1537 by providing some sort of file metadata so I suspect having some sort of lookup table would be the safest way to do this, something like this perhaps: SPECIAL_FILES = [
{
page: "../README",
title: "README",
}
] which would mean it'd still work with the implementation we have here: administrate/spec/example_app/app/controllers/docs_controller.rb Lines 34 to 36 in 844c270
Anyway, there might be a better solution to this, I'm just thinking aloud. How do you feel about taking a look at that? |
Sure, will do Nick. Thanks for the demo. |
We've mostly solved this problem for Administrate now in #1698, which handily starts to solve some documentation problems which weren't ideal otherwise, too. Trying to bundle with that solution means Administrate itself is okay, but some other dependencies aren't. That's potentially worth solving in those projects, but from looking into how to how to do development on Windows in 2020 …not actually using Windows seems the best option through Windows Subsystem for Linux. I did go to look into this and so here's some notes for the future on doing that:
|
In #1514, we added a symlink so that the docs would show up on the demo app …but symlinks aren't supported on Windows and was causing a problem when trying to bundle. This instead adds a lookup table of files not in docs/ which allows us to render those. This partially fixes #1693, in allowing Administrate itself to be bundled without a symlink but other dependencies have the same problem.
Totally random comment outta nowhere (don't ask me how I ended up here), but actually Windows has supported symlinks since Windows Vista. It's just that you need either administrator privileges, or a user with SeCreateSymbolicLinkPrivilege rights. You can check your current privileges with |
@djberg96 - Uh, I had no idea. It's still best not to use symlinks in packages like this one, but that info may still be helpful in the future. Thank you! (How did you end up here? 😝) |
Pre-conditions (platform setup):
Steps to repro:
Expected behaviour:
Actual behaviour:
Installing administrate 0.13.0
_Errno::EACCES: Permission denied @ rb_file_s_symlink - (../CONTRIBUT
TING.md,
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/administrate-0.13.0/docs/cont
tributing.md)
An error occurred while installing administrate (0.13.0), and Bundle
er cannot
continue.
Make sure that
gem install administrate -v '0.13.0' --source 'https://rubygems.org/'
succeeds before bundling.In Gemfile:
administrate_
(see youtube link: https://youtu.be/n-80J7F1spk )
The text was updated successfully, but these errors were encountered: