New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel installer howto. #8

Closed
mariuskubilius opened this Issue Nov 17, 2014 · 20 comments

Comments

Projects
None yet
10 participants
@mariuskubilius

mariuskubilius commented Nov 17, 2014

The docs should mention how to properly install laravel, and use all the features with scotchbox... as people coming from your sites laravel tutorials will definitely have problems doing so.

Also basically can't use laravel installer out of the box used composer to install laravel.

@whatnickcodes

This comment has been minimized.

Member

whatnickcodes commented Nov 18, 2014

I actually plan on making some demo videos for this soon. I'll keep this open until I do (hopefully soon).

@mariuskubilius

This comment has been minimized.

mariuskubilius commented Nov 18, 2014

I needed to add ~/.composser/vendor/bin to PATH and it worked... it was already installed.
the string is: export PATH="$PATH:$HOME/.rvm/bin:$HOME/.composer/vendor/bin"
next enter command . ~/.profile

@jamie-endeavour

This comment has been minimized.

jamie-endeavour commented Jan 16, 2015

Hi there, I'm assuming this ticket has been closed because some videos have been put together? Please can you provide links? Looking to try scotch box with Laravel :)

@whatnickcodes

This comment has been minimized.

Member

whatnickcodes commented Jan 16, 2015

Reopening. You can follow the instructions from above

@whatnickcodes whatnickcodes reopened this Jan 16, 2015

@bill-barron

This comment has been minimized.

bill-barron commented Jan 18, 2015

How much trouble would it be to modify the scotch-box vagrant image and add "~/.composser/vendor/bin" to PATH? It just seems like every user of scotch-box has to manually complete the installation of composer themselves which is supposed to come pre-installed.

@chrisvogt

This comment has been minimized.

chrisvogt commented Jan 29, 2015

This is already done @bill-barron. I can access composer from the CLI on a fresh image. However, the version of composer is from 10/04/2014 and prints a warning that it needs to be updated. (Even without updating I have yet to run into an issue.)

It could be convenient for Scotch Box to auto-update select packages during provisioning.

@mikethrussell

This comment has been minimized.

mikethrussell commented Feb 10, 2015

@chrisvogt, @bill-barron is correct. Composer runs without a hitch (despite the warning), but the CLI 'laravel' command will not work (command not found) until ~/.bashrc is updated.

See the 2nd answer here: http://goo.gl/ for details; surely this can already be present in the vagrant box?

@chrisvogt

This comment has been minimized.

chrisvogt commented Feb 11, 2015

@mikethrussell, not sure if I follow you because I haven't run into this myself. I'm trying to research what the laravel command is, and cannot find it - is this different than artisan?

Regardless, until @ncerminara implements this (which I see in #29 he plans to), you should be able to bootstrap the Vagrant file and do this during provisioning.

Check out jakubgg/scotch-box4dev for an example of how to run shell scripts during provisioning. @mariuskubilius provides the command above (I haven't tested/confirmed):

  export PATH="$PATH:$HOME/.rvm/bin:$HOME/.composer/vendor/bin"

Hope this helps out until the issue is resolved. (While you are at it, you may want to tell composer to auto-update during provisioning too.)

@FDiskas

This comment has been minimized.

FDiskas commented Feb 26, 2015

@whatnickcodes

This comment has been minimized.

Member

whatnickcodes commented Feb 26, 2015

In regards to @FDiskas comment:

Scotch Box exceeds the minimum requirements for Laravel (besides this Path bug). For Laravel, you can use Scotch Box or Homestead. Homestead is officially supported by Laravel and is the best option for your Laravel projects.

@FDiskas

This comment has been minimized.

FDiskas commented Feb 26, 2015

Homestead I could't load for some reason. Scotch Box - needs to install the laravel manually and the project will not be at the public folder. And I like the SASS+COMPASS to be implemented as well. I don't want to do extra steps to make it work.

@whatnickcodes

This comment has been minimized.

Member

whatnickcodes commented Feb 27, 2015

In hopes of clarifying any confusion this causes readers:

  • Laravel runs perfectly fine with Scotch Box.
  • Homestead is the best option for Laravel regardless if @FDiskas got it working or not.
@FDiskas

This comment has been minimized.

FDiskas commented Feb 27, 2015

Yes sure and for installing a Homestead you need to do all this stuff - why?: https://www.youtube.com/watch?v=7jPnneunSV4&list=PLiZKDvbBdxyYDYsMgQCnLVyTw84sR1VU3

Why not just make all this stuff automatically?

@whatnickcodes

This comment has been minimized.

Member

whatnickcodes commented Apr 28, 2015

Hey guys

Run: vagrant box update

Composer and Laravel are now in the PATH

@rach7110

This comment has been minimized.

rach7110 commented Sep 22, 2015

I still can't access my Laravel project using Scotch Box 2.0. I followed the instructions on the Scotch Box homepage: https://box.scotch.io/

I cloned the scotch box repo, and it subsequently added these files and directory:

$  ~: git clone https://github.com/scotch-io/scotch-box.git my-project
$  ~: cd my-project
$  my-project: ls
   README.md   Vagrantfile   public/

But I'm confused as to what I should do after Step 5 in the Scotch Box 2.0 instructions in order to access my project. I tried cloning my existing Laravel project into the public folder:

$  my-project: cd public/
$  public: git clone https://github.com/my-username/my-laravel-project
$  public: ls public/
   my-laravel-project/

But when I visit 192.168.33.10 in my browser, I just see the directory structure. So that isn't right (unless I'm missing a step here.) Or was I supposed to initially clone the Scotch Box repo into my existing Laravel project folder? Or something else?

Thanks!

@whatnickcodes

This comment has been minimized.

Member

whatnickcodes commented Sep 22, 2015

Okay that makes sense.

Try

cd my-project # Go into whatever folder scotch box is
rm index.php # Get rid of that starter file because we don't need it
git clone https://github.com/my-username/my-laravel-project . # include a "dot" at the end to do current directory instead of my-laravel-project folder

Boom boom boom booom

@rach7110

This comment has been minimized.

rach7110 commented Sep 22, 2015

Thanks, @ncerminara! That solved my issue.

And for clarity, I removed the index.php file from the public folder and also cloned my Laravel project inside that same public folder:

cd my-project/public
rm index.php
git clone https://github.com/my-username/my-laravel-project .
@whatnickcodes

This comment has been minimized.

Member

whatnickcodes commented Sep 22, 2015

So you're good?

@markeilander

This comment has been minimized.

markeilander commented Sep 24, 2015

Composer works, laravel doesn't.

@weber-stephen

This comment has been minimized.

weber-stephen commented Oct 13, 2015

Followed this tutorial and it mostly worked, but there is an error.
http://dobsondev.com/scotch-box-laravel/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment