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

Add "fakes3.bat" for native Windows use. #176

Closed
wants to merge 1 commit into from
Closed

Add "fakes3.bat" for native Windows use. #176

wants to merge 1 commit into from

Conversation

supahgreg
Copy link
Contributor

This is the Windows version of the Linux/Mac "fakes3.sh" script. The command ('fakes3 ...') remains the same since the user's Ruby bin (which contains the FakeS3 gem's "fakes3.bat") should be in the system path.
Related to #167
See #167 (comment)

This is the Windows version of the Linux/Mac "fakes3.sh" script.  The command ('fakes3 ...') remains the same since the user's Ruby bin (which contains the FakeS3 gem's "fakes3.bat") should be in the system path.
Related to #167
See #167 (comment)
@Martii
Copy link
Member

Martii commented Jun 16, 2014

We need to ensure that execute bit and remaining perms are properly set on this if merged... I'm not sure where and if GH shows this on a pr. Greasefire has/had some issues with having global write access and execute set so I just want to be sure here that we don't run into that issue.

@Zren
Copy link
Contributor

Zren commented Jun 16, 2014

Doesn't installing git map *.sh files to sh.exe?

@Martii
Copy link
Member

Martii commented Jun 16, 2014

Doesn't installing git map *.sh files to sh.exe?

Yes via at least Git Bash referenced comments:

These seem to be largely dismissed. :\ From what I can tell he is going off of sizzles "Agreed." response... so @sizzlemctwizzle you need to clarify more please.


And yes to Command Prompt (cmd.exe ... note the > which means I'm in Windows for sure)... I don't have Ruby installed yet nor the gem so it will return an error in the following shell session log:

> fakes3.sh
Welcome to Git (version 1.9.2-preview20140411)


Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
C:\...\Documents\My Repos\OpenUserJS.org\fakes3.sh: line 2: fakes3: command not found

UPDATE:

> gem install fakes3
ERROR:  Could not find a valid gem 'fakes3' (>= 0) in any repository
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    SocketError: getaddrinfo: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.  (http://rubygems.org/latest_specs.4.8.gz)

but after trying at least half a dozen times in Administrator leveled required account:

> gem install fakes3
Fetching: thor-0.19.1.gem (100%)
Fetching: builder-3.2.2.gem (100%)
Fetching: fakes3-0.1.5.2.gem (100%)
Successfully installed thor-0.19.1
Successfully installed builder-3.2.2
Successfully installed fakes3-0.1.5.2
3 gems installed
Installing ri documentation for thor-0.19.1...
Installing ri documentation for builder-3.2.2...
Installing ri documentation for fakes3-0.1.5.2...
Installing RDoc documentation for thor-0.19.1...
Installing RDoc documentation for builder-3.2.2...
Installing RDoc documentation for fakes3-0.1.5.2...

Trying to exec:

> fakes3.sh
Welcome to Git (version 1.9.2-preview20140411)


Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
C:\...\Documents\My Repos\OpenUserJS.org\fakes3.sh: /c/Program Files (x86)/Ruby193/bin/fakes3: "C:/Program: bad interpreter: No such file or directory

Think we need to tell contributors not to change the default installation path since it's a "short name" by default. We would still need to instruct them to do this with a .bat file which is currently unneeded with git.


After all of this ran:

> fakes3.sh
Welcome to Git (version 1.9.2-preview20140411)


Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
Loading FakeS3 with C:/.../Documents/My Repos/OpenUserJS.org/fakeS3 on port 10001 with hostname s3.amazonaws.com
[2014-06-16 18:59:38] INFO  WEBrick 1.3.1
[2014-06-16 18:59:38] INFO  ruby 1.9.3 (2014-02-24) [i386-mingw32]
[2014-06-16 18:59:38] INFO  WEBrick::HTTPServer#start: pid=3852 port=10001

and Windows Firewall prompted me to allow access and then...

SUCCESS: What a lengthy procedure! That's just in the admin account so far... and confirmed in lower leveled accounts too for exec.


Removing prior vote and changing to -1 ... I think we don't need the .bat file to maintain and support at this point.

@supahgreg supahgreg closed this Jun 17, 2014
@Zren
Copy link
Contributor

Zren commented Jun 17, 2014

You did close and reopen your command line after changing your env variables right? The env vars are only assigned when the Git Bash/CMD opens.

@Martii
Copy link
Member

Martii commented Jun 17, 2014

You did close and reopen your command line after changing your env variables right?

I rebooted just to be sure in Windows... learned this after many decades of Windows usage. I also checked PATH in the system environment which seemed to be alright but quoted those too just as a test... rebooted... no difference. I think the problem lies in the fakes3 gem files for not finding it in the path but I wasn't willing to go any further to determine why the alternate installation path didn't work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants