I'm very new to coding and I was beginning to set up my development environment according to a Mackenzie Child youtube video. After downloading iTerm and installing homebrew, I was having trouble with updating the Ruby 2.0.0 version to 2.2.2. In the video Mackenzie changes his ~/.bash_profile and restarts iTerm to resolve the problem. I did the same thing except now iTerm doesn't recognize any commands. I can't access bash_profile or run any commands.
I believe the problem occurred when I changed my bash_profile except I can't access/find it anywhere. The command line doesn't let me access it either.I can't find any solutions to my specific problem online so I'm grateful if anyone can help.
Screenshot of iTerm
Thanks!
If restarting iTerm didn't fix your problem, then:
Open iterm.
Run export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin .
Run open -a TextEdit ~/.bash_profile . Paste what's in that file here.
Related
Can't use brew on an other konsole (terminal) page.
Hi I'm here to ask for a help from you guys
I installed home brew so well. And it worked in the same konsole which I have done installation. But then, when I wanted to use it on an other terminal (new terminal page) I got error like zsh: correct 'brew' to 'free' [nyae]? and also zsh: command not found: brew . I don't know what to do, I tried a lot of things but still nothing changed than before.
Can anyone tell me why my app is not installing at all and ending with the error message
Observatory connection never became ready.
the app was working perfectly fine until yesterday .
I have changed the channel to master yesterday in the command prompt and from then on the app never runs.
I even switched back to channel alpha but still no use.
I have attached a screenshot of the command prompt where the installation was stuck forever.
I am not so sure if I need to reinstall the flutter. I am worried if I uninstall the flutter now it may not configure properly and I might break it forever.
Please can someone tell me what exactly might have gone wrong.
Many Thanks,
Mahi
Instead of reinstall try with following: (Mac)
Set Path Variable: via following terminal command
export PATH=~/flutter/bin:$PATH;
that is bin folder path of flutter.
export PATH=[PATH_TO_FLUTTER_GIT_FOLDER]/bin:$PATH
https://flutter.io/setup-macos/#update-your-path
If above not worked. Check with the Dart version
dart --version
Install the latest dart version:
brew install dart --devel
Hope this helps others.
For Mac
open terminal
$ echo $PATH
it will show like this
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
it means you need to add flutter in to path
Open Finder presss command + shift + G
Put /etc/paths in dialog and press GO
Copy the file "paths" and paste it on desktop
Then open the pasted "paths" file from desktop
and add following line into end of the file "/flutter/bin"
Then copy that file and again paste it on /etc/paths
same like step no 2
it will ask you to replace or not
press replace
Now if you hit $ echo $PATH on terminal it will show
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/swagat/development/flutter/bin
Now your $flutter doctor will work perfectly
The solution is from Google Groups #Flutter-Dev
Thank you very much for your reply #Michael Thomsen.
I've tried what you have suggested and the details are as follows:
When I used flutter run -v command the command prompt output is as follows:
It was stuck for a while at waiting for port connection if I am not wrong.
So I've used AndroidStudio, File>Open and selected android/ folder to run the app then the gradle was showing an error:
Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (25.2.0) and test app (25.4.0) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
I modified the build.gradle(Module:app) to show the correct version of 25.2.0 which was previously showing 25.4.0.
dependencies {
androidTestCompile 'com.android.support:support-annotations:25.2.0'
}
I just saved the changes inside android studio and the gradle sync completed without any errors.
Now I can run the app from inside Android Studio and also from IntelliJ IDE.
Thanks very much Michael this solved my problem.
Reinstalling flutter would be my starting point. If this problem persists, please post the output of $>flutter doctor and a description of what exactly leads to this error.
If I run rails s in the terminal, it works. If I open a new terminal window or tab and run rails c, I get the following error: Run bundle install to install missing gems. If I type cd .. and then cd back into the directory and run rails c again, it works. My question is what would be causing this to occur?
I was facing some problems but didn't find the perfect solution.
An alternate working solution for the same is below which worked for me well as expected.
Steps are as below:
nano ~/.bash_profile
Then add the following code at the end of your bash_profile file
current_dir=$(pwd)
cd $current_dir
Let me know if this worked for you.
I have installed latest Xcode 6 and try to run my project on iOS 8 simulator.It gives error as "unable to boot iOS simulator".
I have tried all stack overflow answers but not able to fix this.
I was facing the same issue and finally it is resolved. Thanks to apple who helped me.
For those who are still looking for solution, here is the one which helped me:
Just unset DYLD_INSERT_LIBRARIES environment variable in the /etc/launchd.conf or ~/.launchd.conf file. Which you can edit by "sudo vi /etc/launchd.conf" command. remove the above flag save it by using "ZZ" (captial Z) command and reboot the system. It works like a charm. Hope this helps you all.
Following are the steps for solved above issue:
Search launchd.conf file in your mac
If not found then create from Terminal with help of command
~ user$ sudo touch /etc/launchd.conf
Terminal will ask you machine password
Then Open created file with help of command for EDIT, if terminal give you error as permission failed
~ user$ sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/launchd.conf
Then open file manually from /etc/launchd.conf (Shift+cmd+g) and enter /etc/ (TextEdit software)
Remove the "DYLD_INSERT_LIBRARIES" line and save the file.
Restart your machine.
Xcode should work.
When putting git: dependency in the pubspec. I get the following error:
'Running pub install' has encountered a problem.
...
...
...
Please ensure Git is correctly installed.
My git is installed at version 1.8.0 that I can access via the terminal on my Mac OS X 10.7.5.
Thank you in advance for any help.
I think the problem is that git's path is loaded to PATH only on terminal start up. Terminal does this by running a file ~/.profile or ~/.bash_profile that often exports the paths to commonly used programs. As a consequence, a GUI app such as the Dart Editor can't 'see' git as it doesn't run this start up file.
There is a way to make certain paths visible to all applications though.
See: https://serverfault.com/questions/16355/how-to-set-global-path-on-os-x/277034
Try creating a file:
/etc/paths.d/git
With the following contents:
/usr/local/git/bin/
If your Git installation is located somewhere else, then use the path accordingly.
I decided to just navigate to the dart project folder and run pub install on the terminal.