Skip to content
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
Closed

Laravel installer howto. #8

mariuskubilius opened this issue Nov 17, 2014 · 20 comments

Comments

@mariuskubilius
Copy link

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
Copy link
Member

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

@mariuskubilius
Copy link
Author

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

@JamieBradders
Copy link

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
Copy link
Member

Reopening. You can follow the instructions from above

@whatnickcodes whatnickcodes reopened this Jan 16, 2015
@bill-barron
Copy link

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
Copy link

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
Copy link

@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
Copy link

@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
Copy link

FDiskas commented Feb 26, 2015

For laravel use this https://github.com/CodersAKL/laravel-vagrant

@whatnickcodes
Copy link
Member

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
Copy link

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
Copy link
Member

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
Copy link

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
Copy link
Member

Hey guys

Run: vagrant box update

Composer and Laravel are now in the PATH

@rach7110
Copy link

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
Copy link
Member

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
Copy link

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
Copy link
Member

So you're good?

@markeilander
Copy link

Composer works, laravel doesn't.

@weber-stephen
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants