Heroku toolbelt won't run on windows 7 user with non-latin chars in it - windows

It's a late Sunday night and I decided to mess around with Facebook applications. Turns out they now offer you easy integration with heroku which, of course, I decided to try out.
I patiently waited for the toolbelt to download, installed it and, as usual, nothing will run for me without bit of a struggle.
So I did what I could, googled the problem I'm having and realized that the problem is most likely caused by the fact that my user folder contains non-latin characters.
To make sure that this is the problem, I created another user account, installed heroku toolbelt on it and it works just fine.
Are there any suggestions on how to get this to run without me having to work on the test account?
Thank you for your time!
edit
Forgot to ask wether it's possible to change the folder heroku uses?
edit
Still haven't found anything that would help me fixing this, is there really no way how to fix this?
I've attached the screenshot of error

I've stumbled on this post while being in much the same position. Here goes a solution:
Edit ...\Heroku\lib\heroku\helpers.rb such that def home-directory is as follows:
def home_directory
running_on_windows? ? (ENV['HEROKU_HOME'] || ENV['USERPROFILE']).gsub("\\","/") : ENV['HOME']
end
Now if you set the HEROKU_HOME environment variable to anything the Heroku toolbelt will use that as home. (FWIW: As I have run into this with other tools as well, I set up a link with US-ASCII-only letters to my standard home directory under Users.)

I think what you should do is run the heroku login command from the Git Bash client rather than from the default Windows command line. I have been using the heroku-toolbelt on Windows 7 for about a year now and have not encountered any such problem whatsoever. I had found a way to enable latin characters in the Windows command line sometime ago writing a program in CLIPS, but I don't quite remember how the command goes right now, or what configurations I did. However, if you don't have the standalone Git client installed you can always grab it from: http://git-scm.com.

Related

Shopify CLI - Ngrok error when serving app

I am on a windows 10 machine and trying to use the Shopify App CLI to create apps, but I am running into some errors.
First I installed ruby so I could use the gem command to install the Shopify App CLI, as explained here.
When running shopify version as explained in the above documentation, I get the following output:
bash: shopify: command not found
After googling for a bit I found a solution to this problem, by running shopify.bat version. With this command I can use the CLI.
Moving on, I tried following this tutorial to create my first Shopify App. I used shopify.bat create node to create my app, moved into the folder and ran shopify.bat serve to serve my app locally.
Now the following problem arises:
It starts promising by installing ngrok:
But after waiting for a bit, I get the following output (Sorry for the screenshot, I could not get it to look normal with inline code):
What I also notice is that it uses C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/shopify-cli-1.4.0/ as the path to the CLI, but when looking on Google, most people have /home/[USER]/.shopify-app-cli/ as the path to the CLI. This path does not exist on my machine.
So I would like to know why first of all the serving of the app won't work, because ngrok can't be found, and second why ~/home/user/.shopify-app-cli does not exist.
Thanks in advance,
Mike
I think modern Windows come with Linux now. Since the Internet runs on Linux, you might find development and following tutorials much easier if you use Linux, since all these inconveniences of Windows disappear. Unless you are already super handy with all the quirks of Windows to work around their results, it could be your ticket!
That being said, I mastered this development pattern using *nix and it remains pretty advanced to actually have a smooth workflow for both localhost and production development. Ngrok itself is painful without paying for the service and using puma-dev and puma-ngrok... I laugh when I think about how those essentials running under Windows will be for you.

Is there a way to install an application on a remote machine that does not have sudo privileges?

I have set my mother up with Ubuntu and no admin privileges, so she just has a user account and no sudo. She is running 14.04 (edit - maybe 12.04). I did this as she's 81 and doesn't understand about security updates / phishing phone calls etc so it was my way of protecting her as much as possible.
Now we are in lockdown, she has an issue that is preventing her webcam working and I can't go round to solve it. I have written a bash script to install teamviewer and emailed it to her, however she can't run it without sudo. I have an account on her machine, so I got her to log out as her, and log into my account that does have sudo.
Having (painfully) got her to type the relevant commands, she ran the script (which I had log it's output) and sent me the log. Everything looked to have installed fine.
When she logs back in as her, she can't run teamviewer. I assume it's because I installed it while logged in as me so it's not available to her. First question - is this a safe assumption?
Second question then is what to do next? Should I write a script that gives her sudo access, then install Teamviewer while she's logged in as her after which I can remove her sudo access afterwards, or is there some other way I can write a script that gives her access and removes it?
I don't mind getting her to type in my password over the phone as she has little to no knowledge of what it all means and wouldn't remember it anyway. Putting it all in a script sent by email is a little more uncomfortable, so any suggestions welcome please?
Thanks, and stay safe in these crazy times.
Update:-
I just called her and got her to log in as me to try and run Teamviewer. Apparently there is an error:-
dependency is not satisfiable libc6 ( = 2.17)
A quick google suggested to install it from the command line which I tried, but my mother can't read the output of install attempt. I don't think it's installing correctly possibly due to an old version of Ubuntu. I will probably try writing a script that logs the output of the install attempt.
I realise that this is all like trying to give a haircut through the post, but in the meantime I am learning about Bash Scripts :)

Install heroku cli on linux *without* root, and *no auto update*

I am a CS professor trying to teach web app development (Flask, Rails, SparkJava, etc.) using Heroku.
Our computing environment is a centrally managed Linux system, where neither the students nor I, have root permission. The students also have a very limited file and disk quotas: 200MB of space, and 4000 individual files.
I used to be able to provide them a way to give them access to the Heroku toolbelt by hacking the "standalone install" to get around the default assumption that the person doing the install has root permission.
But it is no longer working. When I install into a directory and run from there, the Heroku toolbelt keeps trying to "auto-update" into the ~/.local/share for each individual user and since the Heroku-CLI installation has over 12000 files in it (!) it blows their file quota.
This is madness. I want to have just ONE installation of the Heroku toolbelt client, update it centrally and NOT have each student have to have their own copy. Is this too much to ask? Is there any way to do this?
There used to be some trick to making the client think it was already up-to-date or some way to configure it to NOT do the auto-update. But I can't find how to do it.
(Thanks in advance for all of your good ideas such as: have them work on their own laptops, make a VM, have them work on AWS, etc. Those are all great ideas for some parallel universe in which they are feasible. If I could use any other computing environment, I'd already been doing that. This is the one I have. If I can't make Heroku work here, I just can't use Heroku in class. And it's frustrating because it used to work.)
As a quick and dirty solution you can in lib/heroku/updater.rb change
def self.needs_update?
compare_versions(latest_version, latest_local_version) > 0
end
to
def self.needs_update?
false
end
and you will not be bugged with updates anymore. You have to do this each time you want to update manually.
A better more maintainable solution would be to get a config value or something similar for controlling this behavior accepted upstream in the toolbelt, which is open source at https://github.com/heroku/heroku

Git ssh.exe has stopped working

I am on Windows 7, 64 bit, and have installed msysgit to work with my github repositories. On my old laptop (32 bit, also windows 7), git ran with no problems, but now git bash runs slowly (I type a command and it takes a couple of seconds for it to actually show up, character by character). When I try to push changes it works intermittently, but more often than not a dialog box comes up saying that "ssh.exe has stopped working...". I click cancel on that, and retry the command. Eventually, it works, asking for my authentication code. Once it gets to that step, it pushes without issue. It's just getting to that step that is the issue.
So basically, my problems are:
git runs slowly on most commands, even typing them in is slow before I execute the command
git bas (ssh.exe) stops working when pushing, works intermittently.
I have reinstalled windows since this issue popped up and that did not fix it.
Regarding the slow typing in git bash and cmd.exe, these other questions might have your answers:
https://superuser.com/questions/157194/typing-in-command-line-cmd-exe-is-very-slow
Msysgit bash is horrendously slow in Windows 7
The first has a solution when you're running a Lenovo Laptop (are you running on one by any chance?).
Since you indicated that even after a Windows re-install you're having the same issue, I would think it's related to hardware or some service or piece of software installed for this specific hardware.
I would also try running git bash as Administrator and see if that makes a difference.
Your SSH issue could be dependent on the other one, so I would solve the slow typing issue first.
Intermittent push, fetch and other remote commands are an indication of not enough concurrent ssh connections allocated in whatever your central repo is hosted on. Bump up the configuration to allow more concurrent secure connections. This is especially true if you are using something like gitolite or gitosis which use one user to allow access to all git users and differentiate the user based upon the public key provided.
I have the same configuration: Win 7 64bit, Msysgit and github. I'we faced the "ssh.exe has stopped working" problem as you did, when pushing to github.
I solved it by using another ssh.exe: I installed Cygwin, and copied over all the binaries to the git's binary folder.
I think that if during the msysgit installation, you specify an external ssh client to use, you can avoid this hack, but at the moment this seemed like a good idea.
I also faced this issue. ssh.exe, the one which git was using, was also being used by OpenSSH which I was running to connect to my US office. I've also installed TortoiseSVN which has its own ssh.exe.
I uninstalled Git and while re-installing I configured Git to use the ssh.exe that's part of TortoiseSVN, and this problem went away.
I faced the same issue today. Disabled the antivirus and it worked perfectly.

How do you install a Ruby on Rails apps on Windows/IIS?

I'm trying to get Redmine working on Windows/IIS 7. I've found several walkthroughs online, but none of them work on my Windows Server 2008 R2 box. I got a simple app (create app, no customization) to get as far as RoR error, but Redmine itself shows a 500 error (ruby.exe exited unexpectedly). I installed sqlite since some guides mention that, though Redmine uses MySQL by default. I started with the Bitnami installer and tried to customize for IIS, RorIIS, FastCGI, lots of things that look like they should work, but this problem is killing me.
If I run ruby.exe from the command line, passing it the path to the dispath.fcgi file I get an error: "The procedure entry point SetMagickMemoryMethods could not be located in the dynamic link library CORE_RL_magick_.dll". I had to install the rmagick gem myself which seemed strange since everything worked perfectly under Apache. I really thought it would be a smooth cut-over since it's up and running already and just changing web server.
Any help is much appreciated.
I've tried a lot to install Redmine on Windows environment under IIS. There's very little (or none) documentation about it. Lost many days on this. In the end, I decided to stick to the Bitnami stack of Redmine. The only caveat is that we had to use another port (8080, in our case), that's it. I gave up the idea of integrating Redmine/RoR with IIS and never looked back. Everything is working great in production now and everyone is happy about it around here.
Sorry I can't give a better answer than that, I'm just sharing some recent experience. I was obsessed about integrating RoR/ISS until I realized it was not a real requirement, it was just something I stuck into my mind. Think about it.

Resources