I'm writing a console command for my Laravel 5.1 app. While developing, I'm having an error somewhere. When artisan reports the error, it doesn't give me the line number or file; I just get an error in the shell highlighted in red background:
[ErrorException]
Undefined variable: answerer
How do I get artisan to show me more information about where the error occurred, specifically line number and file?
Since this is the first hit in Google for me, I reply here. I managed to find a solution to this issue. Simply add the -v option to artisan for getting a stacktrace, including line number.
php artisan -v survey:complete
in your case.
Related
I've been trying to run a development environment of the following SQL language server for VS Code. In the README, it says to use docker-compose up to initiate the docker container. However, every time I execute this command, I receive this error:
error An unexpected error occurred: "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz: ETIMEDOUT"
I did research on issues with fetching Yarn packages, and the most prominent solution involved increasing the maximum timeout to 100000, and I did so with the following command:
yarn add colors/-/colors-1.4.0.tgz --network-timeout 100000 -W
This executes successfully, but I still receive the exact same error when I run docker-compose up. Another solution I found included manually downloading the package, and including a new COPY statement in the dockerfile with the location details (ex: COPY ./docker/colors-1.4.0.tar /opt/sql-language-server/docker), but this did nothing.
I'm using WSL with docker (with a complex pandoc configuration with latex, python and pandoc-filters) and trying a long command with --filter=filters/the_filter.sh that results in an error:
Error running filter filters/the_filter.sh: ./filters/the_filter.sh: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
My filter is a .sh wrapper, mostly to make sure I'm using Python3 (which may not be needed, but I got the hint from here):
#!/bin/sh
python3 filters/the_filter.py $#
Googling the error shows lots of GitHub issues, but no definitive explanation on Stack overflow.
It turns out that my .sh file had Windows line endings: \r\n.
I assume that the system was trying to find /bin/sh\r but the error message is not explaining it.
Correcting the line-endings using dos2unix filters/the_filter.sh, I was able to get rid of the error.
Here are more details of a related problem.
Hi after a fresh DreamFactory Docker intallation I run this command:
docker exec -i -t dreamfactory php artisan config:clear
and then my all my DreamFactory Service is unacessible:
I have made more than one fresh installation and I have the same results.
Could you help me to understand which is the problem ?
It seems a bug !!
Please see my screenshots below. Symply canghing uncomment DF_ALWAYS_WRAP_RESOURCES in .env file whithout running artisan config:clear there is a problem in the services tab of dreamfactory.
then if you try to load your services tab you got an error
but your array isn't wrapped
if you put a # at the beginning of the same row DF_ALWAYS_WRAP_RESOURCES
your servies tab is ok
and your array is wrapped
It's a bug that breaks Services tab when you set DF_ALWAYS_WRAP_RESOURCES=true !!
I used the command "php artisan migrate:reset" and "php artisan migrate:refresh" both gives the error
[Symfony\Component\Debug\Exception\FatalErrorException]
Class '' not found
I also need to remove column from table using migration in laravel 5.1, please guide me or send me any reference links.
I attached my error screen here .
Thanks
When I get an issue like this I usually dump the autoloader:
composer dump-autoload
To remove a column from the database you can either remove it from you migration and run:
php artisan migrate:refresh
Which is usually fine in a development environment, but you will lose any data in your database, so it's a good idea to set up some seeders if you want to do it this way.
Otherwise, you can create a new migration to simply drop your column using:
php artisan make:migration drop_my_column_from_my_table --table=my_table
You would then do something like:
Schema::table('my_table', function ($table) {
$table->dropColumn('my_column');
});
and run you migration as normal:
php artisan migrate
I'm just getting into ruby and am trying to execute a walkthrough from Sam Ruby's Agile web development.
I've created a directory using mkdir work
Next i'm instructed to open a terminal and type rubys> cd work
The error I'm getting reads:
No command 'rubys' found, did you mean:
Command 'ruby' from package 'ruby' (main)
rubys: command not found
Can anyone inform me of what I'm doing wrong?
I've also tried changing from ~ to the work directory before entering my command.
In this book, rubys> is a command prompt, much like you have C:\> in the Windows terminal.
Ignore that first bit and everything should start working.
I guess you're doing it wrong.
mkdir work
creates a directory called "work". It has nothing to do with Ruby.
cd work
will then change into that directory. Forget about the rubys>.