why can't I acces symfony after installation ? Here's the message I get : "-bash: symfony: command not found" - symfony

I'm discovering symfony and on a way to develop a web app. I just installed it (a couple of days now) but yet I can't have access to it through my terminal. It shows command not found is the principal message I get when I try. checked php and composer, they are all ok. But still don't have access to symfony.
Tried using this code
"hardpro$ mv /usr/hardpro/bin/composer.phar /usr/hardpro/bin/composer" to change the directory but yet, nothing.
ESOservices:~ hardpro$ documents/symfony
-bash: documents/symfony: No such file or directory
ESOservices:~ hardpro$ documents/symfony new
-bash: documents/symfony: No such file or directory
ESOservices:~ hardpro$ cd esoServices
-bash: cd: esoServices: No such file or directory
ESOservices:~ hardpro$ cd symfony
-bash: cd: symfony: No such file or directory
ESOservices:~ hardpro$ symfony new --full my_project
-bash: symfony: command not found
ESOservices:~ hardpro$ mv /usr/local/bin/composer.phar /usr/local/bin/composer
mv: rename /usr/local/bin/composer.phar to /usr/local/bin/composer: No such file or directory
ESOservices:~ hardpro$ mv /usr/hardpro/bin/composer.phar /usr/hardpro/bin/composer
mv: rename /usr/hardpro/bin/composer.phar to /usr/hardpro/bin/composer: No such file or directory

You might need to define the PATH. Run this command before you want to run the symfony command.
export PATH="$HOME/.symfony/bin:$PATH"
Then you should be able to run a command like symfony server:start, but you would need to run the export every time you reopen your terminal.
To solve it permanently, you would need to add this command to your bash profile.

It seems like you have an error with your installation, you should install it again.
To install symfony : https://symfony.com/download
To install composer : https://getcomposer.org/download
To use it globally : https://getcomposer.org/doc/00-intro.md#globally
You have to run the command mv composer.phar /usr/local/bin/composer in the same folder where you run the install composer commands.

Related

Symbolicate command not found when fully symbolicate the crash report in Xamarin iOS

I get this error when I submit App to AppStore:
I searched the net and found this article: https://jmillerdev.com/symbolicating-ios-crash-files-xamarin-ios/
I tried to follow the step-by-step instructions as follows:
I downloaded the crashlog.txt files and changed the extension to .crash, moved it to the folder CrashTop
I found the .app file by changing MyApp.ipa to MyApp.zip and extracting it. It's in the folder PayLoad. I copied the file MyApp.iOS to the folder CrashTop
In Xcode/Window/Organizer. Archives Show in Finder opens showing the package contents. I found the dSYMs folder and copied the .dSYM file to the folder CrashTop
Next i Open Terminal and run this command:
alias symbolicate="/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash -v"
and
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
Run Symbolicate
Open Terminal again and cd to the directory folder CrashTop and run the command
symbolicate -o "symbolicatedCrash.txt" "crashlog-DCE8F822-47EB-42F9-A737-5D137FD827FE.crash" "MyApp.iOS.app"
But what I get back is: command not found: symbolicate
It's been 10 days. I've tried searching all over the internet. But it doesn't solve the problem. I also used Microsoft.AppCenter.Crashes to catch the error. However, it shows no errors. On xcode (13.3.1) simulator it works fine.
Please solution to solve this problem.
Ask for any help from everyone.
Update
Copy all files to CrashTop folder.
Run command:
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
and
./symbolicatecrash -v crashlog-DCE8F822-47EB-42F9-A737-5D137FD827FE.crash MyApp.iOS.app.dSYM
-> I get the error: zsh: no such file or directory: ./symbolicatecrash
Do not set alias .
You can copy symbolicatecrash file and paste it to the CrashTop folder .
and run the command
./symbolicatecrash -v MyApp-Crash-log.crash MyApp.dSYM

cp:omitting directory 'off_web' when I copy my project

In my computer, I want to backup the project, so I copy:
cp off_web off_web_bak_20171008
But it give the below error:
cp:omitting directory 'off_web'
You try the below command:
cp -r off_web off_web_bak_20171008
This error when you execute cp command means under the off_web directory, there are still have directory under the off_web, use -r will recursive copy the project.

Docker dotnet image container do not allow me to rebuild after change

I am new to docker, and I am trying to set a container to aspnet development. I just run yo aspnet on a folder and run:
docker run -i -t -p 80:5000 -v "$(pwd):/app" -w "/app" microsoft/dotnet /bin/bash
After that, I run the following commands to prepare to environment:
dotnet restore
dotnet build
dotnet run --server.urls http://*:5000
When I do some change to anything in the directory, even to a cshtml file, the changes do not reflect. If I try to stop the server and rerun it, I receive the error:
/usr/share/dotnet/dotnet compile-csc #/app/obj/Debug/netcoreapp1.0/dotnet-compile.rsp returned Exit Code 1
/app/error CS2012: Cannot open '/app/bin/Debug/netcoreapp1.0/app.dll' for writing -- 'Could not find a part of the path
'/app/bin/Debug/netcoreapp1.0/app.dll'.'
Compilation failed.
I could notice that I cannot delete the app.dll file from the bin folder. When I try to delete it, it gives me the following error:
rm -R bin
rm: cannot remove 'bin/Debug/netcoreapp1.0/app.dll': No such file or directory
But, if I enter the folder, the file is there with 0kb size.
Do you know what am I missing to allow me to rebuild the app without need to restart the container?

error: package javax.servlet does not exist/ directory not found

tomcat
-webapps
-Servlet
-WEB-INF
-lib
-classes
-cc
-openhome
-HelloServlet.java
in cmd ,
C:\tomcat\webapps\Servlet>javac -classpath .;c:\tomcat\lib\servlet-api.jar -d ..\classes\cc\openhome\HelloServlet.java
but message says directory not found
and I compile the HelloServlet.java , it shows package javax.servlet does not exist
I tried each method found from here, is anyone know what it happens? thank you
-d is the switch for changing output directory and not for defining a java source file and it expects a directory, not a file.
Also that class folder is usually for the compiled classes and not for the sources.
Try this:
javac -classpath .;c:\tomcat\lib\servlet-api.jar -d .\WEB-INF\classes .\WEB-INF\classes\cc\openhome\HelloServlet.java

Updating the composer.phar on Symfony2

I have an already started Symfony2 project. I need to install a new bundle, and as I saw i need to add a new line to my composer.json and then execute the update command.
The thing is, my composer.phar file and the .json are on different folders.
/httpdocs/composer.json
/bin/composer.phar
So after I add this line to the .json file:
"doctrine/mongodb-odm-bundle": "3.0.*#dev"
If then i try /bin/php composer.phar update doctrine/mongodb-odm-bundle i got an error saying that the composer.json is not there and is correct of course. So my doubt is WHY thoose files are in different folders? does the previous developer make a mistake? Should I move the files to a same folder? To bin or httpdocs?
It doesn't matter where the composer.phar lives. The relevant part, that your current working directory is in the symfony project (where the composer.json lives). Then simple execute composer (if the execute bit is set, no call to php is required).
/bin/composer.phar update doctrine/mongodb-odm-bundle
You can have a global composer.phar and use only this one. This is how you would normally have it on a development machine where you have multiple composer projects.
Some people tend to put a composer.phar into their projects so they can deploy it together with their application.
Solution to composer complaining about the missing composer.json:
you have to change your working directory to the path where the composer.json you want to use is located. ( every composer project has it's own composer.json )
This means cd into your project directory ...
cd /path/to/yourproject
... Before executing
/bin/composer.phar update ...
Alternative:
You can specify a working directory for composer with the --working-dir option.
This way you point composer to your project from any current working directory ( even if you project's path differs from where your cwd is ) . example usage:
composer --working-dir=/path/to/yourproject <command>
Tip #1
rename /bin/composer.phar to /bin/composer
mv /bin/composer.phar /bin/composer
chmod +x /bin/composer
Then you can simply ( assuming /bin is in your PATH ) ...
composer <command>
Tip #2
You can check where you currently are with pwd ( *p*rint *w*orking *d*irectory )
pwd

Resources