Does laravel 5.1 work without internet connection?
I like to create a laravel new application
when i execute laravel new test (with intenet connection) it works well;
but when i execute similar command in the same directory (new anotherName) without internet connection it doesn't work and the nest error message is shown
[GuzzleHttp\Exception\RequestException]
Error creating resource. [url] http://cabinet.laravel.com/latest.zip [type]
2 [message] fopen(http://cabinet.laravel.com/latest.zip): failed to open s
tream: php_network_getaddresses: getaddrinfo failed: Name or service not kn
own [file] /home/<Myname>/.composer/vendor/guzzlehttp/guzzle/src/Adapter/Str
eamAdapter.php [line] 367
Is there a solution because i can't work online always?
When you use the laravel installer it fetches the latest version from the server. One solution would be to initialise a Laravel project, then add it to git version control and then when offline checkout the project to a new folder. You'd have to manually choose a new app key (I think). You will also not be able to composer require or npm install any new packages while offline.
Once you have created it though it should run offline (unless your views are sourcing assets from, say, bootstrap or jQuery CDNs).
Composer 2+:
COMPOSER_DISABLE_NETWORK=1 laravel new myapp
Troubleshooting:
Check your composer version: composer --version - you may have to update to the latest version with composer self-update;
Check you have a global cache: echo $COMPOSER_HOME - you may have to create a ~/.composer and set export COMPOSER_HOME="${HOME}/.composer" to your ~/.bashrc or ~/.zshrc - don't forget to close and open your terminal to apply the changes;
If you get this error https://repo.packagist.org could not be fully loaded (Network disabled, request canceled: https://repo.packagist.org/packages.json), package information was loaded from the local cache and may be out of date, the laravel packages are not in the global cache. Run the command with internet enabled to download the files.
Related
I have installed Hyperon a business rule engine on windows machine.
I have fallowed instruction to install it from:
- https://www.hyperon.io/tutorial/installing-hyperon-studio
After installation I have browse below URL to see whether #Hyperon web app is running or not.
http://localhost:38080/hyperon/app
I am getting this error:
Error Screenshot
Reproduceable Steps:
Downloaded hyperon zip and extracted it.
Open the file directory and reach to the /bin folder
Opened it in command prompt:
Ran startup.bat file.
Refer to below screenshot:
command prompt logs
tomcat command prompt logs and output after executing- startup.bat
Such effect occurs when trying to run hyperon with JDK 8.
Hyperon Studio requires JDK 11.
See installation guide:
https://www.hyperon.io/tutorial/installing-hyperon-studio
If you have multiple JDKs installed, you can swith to proper by setting JAVA_HOME variable:
for example:
cd c:\hyperon-studio-2.1.9\bin
set JAVA_HOME=c:\java\jdk-11.0.4
startup.bat
The first run may take a minute, because hyperon needs to initialize database schema.
Once it is fully started you will see hyperon.log file and should be able to access localhost:38080/hyperon/app.
I am trying to migrate a huge project having visual studio and maven projects to bazel. I need to access our in house maven server which is encrypted. To get access I need the load the maven_jar skylark extension since the default impl does not support encryption (get error 401). using the extension leads to a lot of troubles, like:
ERROR: BUILD:4:1: no such package '#org_bouncycastle_bcpkix_jdk15on//jar': Traceback (most recent call last):
File ".../external/bazel_tools/tools/build_defs/repo/maven_rules.bzl", line 280
_maven_artifact_impl(ctx, "jar", _maven_jar_build_file_te...)
File ".../external/bazel_tools/tools/build_defs/repo/maven_rules.bzl", line 248, in _maven_artifact_impl
fail(("%s: Failed to create dirs in e...))
org_bouncycastle_bcpkix_jdk15on: Failed to create dirs in execution root.
The main issue seems to be the shell that needs to be provided to bazel in BAZEL_SH environment variables:
I am working under windows
I am using bazel 0.23.2
bazel seems to run a bash command using "bash" directly and not the one provided by env variable.
I got a ubuntu shell installed in windows. bazel was using everything from ubuntu, especially when using maven (settings.xml was using from ubuntu ~/.m2 and not from windows user)
after uninstalling ubuntu and making sure that bash in a cmd ends up in "command not found" I also removed the BAZEL_SH env var and bazel throws the message above
after setting the BAZEL_SH variable again it fails with the same error message
I am assuming that bazel gets a bash from somewhere or is ignoring the env variable. My questions are:
1. How to setup a correct shell?
2. Is BAZEL_SH needed when using current version?
For me the doc at bazel website about setup is outdated.
Cheers
Please consider using rules_jvm_external to manage your Maven dependencies. It supports both Windows and private repositories using HTTP Basic Authentication.
For me the doc at bazel website about setup is outdated.
The Bazel team is aware of this and will be updating our docs shortly.
Currently I have an installer built with Squirrel.Windows. On uninstall, the application directory under:
C:\Users\Me\AppData\Local\MyApplicationDirectory
remains. I have tried using rimraf under the the --squirrel-uninstall hook to remove the directory, but it fails because the files are in use.
Here is what I have that is not working:
case '--squirrel-uninstall':
var myLocalAppData = "C:\\Users\\Me\\AppData\\Local\\MyApplication";
rimraf(myLocalAppData);
app.quit();
I have tried the following to no avail:
Using a setTimeout() to delay the rimraf(myLocalAppData) call
Using the maxBusyTries param in the rimraf options to continue retrying for 10 seconds if a EBUSY, ENOTEMPTY, or EPERM error code is encountered when trying to clean up the directory
Running app.exit() before the rimraf(myLocalAppData)
I know the NSIS installer provided by electron-builder properly cleans up the app data directory, but I cannot use it as I need a MSI to support machine wide installations via Group Policy Management.
Any help is appreciated!
I am trying to add the mod_zeropush module to the existing ejabberd MongooseIm server.
I copied the beam file to location where all beam files are there in the rel folder.
When do the $sudo bin/mongooseimctl debug command and finding the mod_ all entries matching with mod_... I see all except my mod_zeropush.
Can anyone help me how they made this module add to their chat server.
Raised this issue to Github guys as well : MongooseIM GitHub
I achieved this by getting some help and would like share how its added to MongooseIM.
This setup is done on a server running Ubuntu 16.04.
After you downloaded mod_zeropush.erl (maybe from here), put it in the location as mentioned below:
`<GitSourceMongooseFolder>/apps/ejabberd/src/mod_zeropush.erl`
Run sudo make in MongooseIM directory.
After the build is done, the beam file is created in the rel
folder at location given below:
/MongooseIM/rel/mongooseim/lib/ejabberd-2.1.8+mim-2.0.0beta2-312-g3cec442/ebin
Add the following code to ejabberd.cfg in modules section.
{mod_zeropush, [
{sound, "default"},
{auth_token, "myapp-chat-token"},
{post_url, "http://my.url/mypath"}
]},
Go to rel/mongooseim folder and enter the command sudo
bin/mongooseimctl debug
Check by entering mod_ on shell prompt then Tab; you should see
mod_zero
Go to root/rel github directory and sudo bin/mongooseim restart
Done. You should receive offline messages on your web server.
i have a directory with some .php files in it...do i need to install symfony in that directory so that i can run symfony commands from that directory?? i tried: pear channel-discover pear.symfony-project.com
and got:
Channel "pear.symfony-project.com" is already initialized
the i tried: pear install symfony/symfony
and got:
WARNING: configuration download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable. Change download_dir config variable to a writeable dir to avoid this warning
Cannot install, php_dir for channel "pear.symfony-project.com" is not writeable by the current user
how do i fix this please? must i run it as sudo??
thanks
If I remember well, Symfony is "system-wide" if installed through PEAR (like you are trying to do).
Now it is recommended by the manual to do a "standalone" install through SVN. See http://www.symfony-project.org/gentle-introduction/1_4/en/03-Running-Symfony
As well, the sandbox will bring a "standalone" installation of Symfony (you will have to be in the project root directory to be able to run the symfony commands)
EDIT
Example of quick install using SVN:
mkdir /path/to/symfony
cd /path/to/symfony
svn checkout http://svn.symfony-project.com/tags/RELEASE_1_4_0 .
but it should be better to follow the manual and configure the external SVN sources.
I run servers where I have applications that use different versions of symfony simultaneously. I found it much easier to deal with the SVN checkout than the PEAR insteall.
So what I've done is do an SVN checkout of each revision that I need
into it's own folder. In my case i check them out to
/usr/share/symfony/(version)
Then I configure the ProjectConfiguration.class.php to reference whatever version is needed, using the line:
require_once '/usr/share/symfony/1.x.x/lib/autoload/sfCoreAutoload.class.php';
If I need to switch to a different symfony version, I can just change that config.
That is, assuming all my code is compatible with that version