Laravel Spark Installation in MAC - laravel

I'm new to mac and I don't know how to add path to the system. I have already cloned the file for spark and done composer update. I need to this next step. How do I do it in MAC?
Next, make sure the spark-installer directory is added to your systems $PATH variable, so that your machine will be able to locate the spark executable when you issue Spark commands.

You do it by updating the PATH variable.
export PATH=$HOME/.composer/vendor/bin:$PATH
However, this will not persist. If you close the terminal window, the PATH will be restored to its original value. You need to add this line to your ~/.bash_profile
Run this command to add the line to your ~/bash_profile
echo 'export PATH=$HOME/.composer/vendor/bin:$PATH' >> ~/.bash_profile
To verify that you have the correct path: echo $PATH, and you should see .composer/vendor/bin in the middle of the output
For spark specifically, you need to add the path to the location where you cloned the repo.
echo 'export PATH=path/to/spark/repo:$PATH' >> ~/.bash_profile
Here is a full list of commands to install Spark:
cd $HOME
git clone https://github.com/laravel/spark-installer.git
echo 'export PATH=$HOME/spark-installer:$PATH' >> ~/.bash_profile
source ~/.bash_profile
cd ~/spark-installer
composer install
spark

Related

Installing flutter bash_profile

I'm trying to install flutter
I need to create with the terminal a file named bash_profile
I tried to create it but each time that I'm trying, I'm getting a bash_profile file with an extension: bash_profile.swo and bash_profile.swp instead of bash_profile.
How can I remove the 2 bash_profile.swo and bash_profile.swp?
thank you
You can simply use echo '' >> .bash_profile.
You can also use the touch command to do it.
Remember that bash_profile file is a occulted file. you probably already have this file, try check it by running ls -la.
and you must to use a 'dot' before 'bash' >> .bash

Unable to install modman, .profile is missing

https://github.com/colinmollenhour/modman/blob/master/README.md
I am trying to install modman.
First I install via:
bash < <(curl -s -L https://raw.github.com/colinmollenhour/modman/master/modman-installer)
modman is created at User/Username/bin/modman
I got lost on the next part:
source ~/.profile
I don't have .profile in my directory, so i created one in my user root and I added
export PATH=$PATH:/Users/Username/bin/modman
I am not sure if that is correct, when I cd to my project directory and
do modman init it returns modman: command not found
Why am I getting this message?
You add directories to PATH, not individual binaries.
export PATH=$PATH:/Users/Username/bin
Note the line from the installer that would have updated .profile for you:
echo -e '\nPATH="$HOME/bin:$PATH"' >> $HOME/.profile
(Typically, you might add $HOME/bin to the beginning of the path so that you can override system binaries, but in your case, it doesn't matter since you don't have modman installed outside your home directory.)

Torch / Lua after installation is not working

I have followed the following approach in order to install Torch in my machine (Mac).
http://torch.ch/docs/getting-started.html#_
When I am done with the installation, I type:
$ luarocks install image
or $ luarocks lis
or $th
in order to load the th or to make updates on the lua packages. It says "command not found". Do you have any idea how I can resolve this issue?
If you're on a Mac using the bash terminal, make sure that you've permanently added /Users/you/torch/install/bin to your PATH.
To do this:
Navigate in your terminal to the root directory by running the command:
$ cd
Using the text editor of your choice (emacs, vim, etc.) open the .bash_profile file for editing. For example:
$ emacs .bash_profile
Add the following line to the end of the file (replacing 'you' with your Mac username):
PATH=$PATH\:/Users/you/torch/install/bin ; export PATH
Save and exit the text editor
Source the changes by running:
$ source .bash_profile
Check that your PATH has been updated (look for /Users/you/torch/install/bin in the string returned):
$ echo $PATH
To make sure it has been changed permanently, completely quit Terminal, open it and run echo $PATH again
Now try th and it should run Torch!
For more help on PATH:
https://kb.iu.edu/d/acar
The Torch installation (at least for me) added the line . /Users/jb/torch/install/bin/torch-activate to my .profile file, not .bash_profile. I tried adding that exact line to .bash_profile but it didn't work, so based on the recommendations here I got rid of the trailing directory and such.
Have you updated your PATH? It should include something like
/home/user/torch/install/bin
I faced the same issue and following this post deleted and reinstalled everything. However in the end what helped was adding /home/user/torch/install/bin/ to the PATH variable.
I have resolved the issue. I have deleted torch and I have installed it again. I have updated my PATH, and I have ran the $ luarocks install image command. After all of these, I was able to ran $ th command and in general torch.

How to set path to ruby on win 7

I am using git-bash in win7. I have installed c:/ruby/bin/ruby.exe. I've added c:/ruby/bin/ to my PATH environmental variable and restarted. however when I do:
$ which ruby
/c/opscode/chef/embedded/bin/ruby
$ echo $PATH
/c/ruby/bin:/c/st:/c/Users/Bill/bin:.:/usr/local/bin:/mingw/bin:/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files (x86)/QuickTime/QTSystem:/c/python27:/c/Python27/Lib/sitepackages/django/bin:/c/Python27/Scripts:/c/MinGW/bin:/d/opscode/chef/bin:/d/opscode/chef/embedded/bin:/d/VirtualBox/VBoxManage:/d/HashiCorp/Vagrant/bin:/c/opscode/chef/bin:/c/opscode/chef/embedded/bin:/c/ProgramData/Composer/bin:/c/Program Files (x86)/git/cmd:/c/nodejs/:/c/Users/Bill/AppData/Roaming/npm:/c/Ruby193/bin
How do I change this to "c:/ruby/bin/" ?
Add following line to /c/Users/your-username/.bashrc file to make the /c/ruby/bin placed before any other directory in the PATH:
export PATH=/c/ruby/bin:$PATH
Or, start git bash, and issue the following command:
echo 'export PATH=/c/ruby/bin:$PATH' >> ~/.bashrc
UPDATE
If above still does not work, check whether the directory /c/ruby does exists. If it does, check whethere ruby.exe file is in the directory /c/ruby/bin.
If the directory does not exist, replace /c/ruby/... with the one really exists.

Snap web framework and OSX Path

preface: new to OSX development.
cabal install snap --this works fine.
When I type snap into the terminal nothing happens. How do I export my snap path to my $PATH in OSX?
same thing happens with happstack and yesod.... those are both installed as well
Simply do (in the terminal):
export PATH="$HOME/.cabal/bin:$PATH"
To make it permanent, add that line to the hidden .profile file in your home directory and re-login. You can edit ~/.profile using open ~/.profile. This can also be done with this line in the terminal:
echo 'export PATH="$HOME/.cabal/bin:$PATH"' >> ~/.profile

Resources