Here is the error I am getting:
Script php artisan optimize handling the post-update-cmd event returned with an error [RuntimeException] Error Output: up
To fix this you need to install mcrypt. In ubuntu execute the following command:
mcrypt
sudo apt-get install php5-mcrypt
Then update composer:
composer update