There's clearly something I don't understand about Erlang... well, among many things.
I've set up an application under Rebar called cw.I start it up and everything runs fine.
Now I want to create an environment variable so I can access the src directory. I've entered the following in cw.app.src:
{env, [{proj_root, "mypath/apps/cw"}]}
Compile, start with Rebar start.sh... everything works fine.
Now the mystery. Yesterday when I did this, I got the correct path when I entered application:get_env(cw, proj_root) in the Erlang shell. But today I get undefined.
What am I missing?
Many thanks,
LRP
application:load(cw) should be enough.
Did you forget application:start(cw) first?
If application not started, the env is undefined.
Related
I have an electron app for which I want to set up an auto-updater. I followed this blog post and made a small demo, it worked great with some small changes.
Then I tried to implement it with my real project and now I am getting an error.
GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
I already have electron-builder.yml file and i even tried setting up GT_TOKEN anv variable but it still throws same error.
Forget about that post, I tried to implement it but faced many issues with that.
Try this one.
But take a note that For macOS, you will need a code-signing certificate.
For windows and Linux it works seemlessly.
Just follow the instructions.
For exporting the token, you need to add the export line at the end of the .bashrc or .profile in Linux/Mac. Google it if you don't know how.
Make sure to restart IDE/Terminal to inherit latest env variable.
Well, I found the solution, I set env key in .bash_profile and it worked. I don't know why setting GH_TOKEN in the main.js file and in electron_builder.yml file didn't work. It works in the beginning but then when I added more configuration to package.json file it started throwing this error.
I have a Rails project and I am trying to run a script using Rails runner. This script runs fine on my local machine, but I am trying to run it on a new EC2 instance that I just set up.
When I run the script, it exhibits some very odd behavior. The first line in the script is a debug statement "Starting". When I say "hang" I mean that "Starting" is never printed.
rails runner Script.run //hangs forever
It is worth mentioning that the purpose of this script is to make several HTTP requests. So, in debugging it, I commented out various lines until I had the maximal program that would actually run.
The only line I needed to comment out is the one that actually called Net::HTTP.request. Then, the script would run, and print all of the debug statements that it was supposed to, but it wouldn't actually function as intended (obviously).
What seems odd to me is that the script will not even print "Starting" when the line that makes the HTTP request is present. The error would make some sense if it got to the HTTP request itself and then hung forever, or at least got some part of the way into the program.
What can cause Rails to behave this way? Any suggestions are appreciated.
Thanks!
I actually made a dumb mistake, but I am going to answer my question for anyone who makes the same mistake in the future.
I forgot to add "$stdout.sync = true" to the config file, so Rails just appeared to be hanging because it was not writing to stdout. When the HTTP request was disabled, it ran fast enough so that I didn't notice the writing was delayed.
I don't know why my system is only detecting environment variable of system and not user.
For instance, when I put "C:\Program Files\Java\jdk1.8.0_25\bin" as first environment variable in user environment variable , I was not able to run "javac" command.
But when I pasted it to system variable it started working.
I know about the dependency issues if I would have placed the path in user variable at the end so I put it at the beginning but still it didn't work..
I searched but found no real solution except dependency issue if I put it at the end.
Have you restarted the CMD?
Maybe you have to logoff & logon to refresh the user variables.
It least on my Windows 7 I have the same behavior, new user variable is not available.
When I try to go to the puppet dashboard it loads up a white page saying
The environment must be purely alphanumeric, not ''
I googled this error a bit but there does not seem to be a finite solution yet. As fast as what I've done I've looked into the conf.d files, but I'm afraid to make the wrong edit. I'm still new to this and was wondering if anyone has ever ran into a similar situation?
This happens if one tries to access puppet console in wrong port (8140) instead of 443, assuming default ports are being used.
This also happens when you install puppet-passenger The opensource.
In this case - everything is OK!
Install Open Source agent and be a Puppet Master :)
I have a test in fitnesse which used to work, but when I got into work today the test did not start at all. As soon as I press test I get the "0 errors 0 warrings..." text on the top of the test. Looking in the source control software, I can not find any changes to the test, or to anything related to it. I have noticed that the runner process does not start when I run the test. Other tests seem to work fine, and I can copy the tables from the test which is not working into an other test and everything is fine. Any ideas on what could be wrong?
My standard answer in this situation is, "have you checked your classpath?"
I say this, as typically when this sort of thing happens, it is that the !path doesn't point to the stuff you need, whether it be FitNesse.jar or your own custom code.
Also, do you get an output page where you can check the classpath? i doubt it, but that can help diagnose classpath issues.