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

error on use Dancer2 #19

Open
gingerhot opened this issue May 25, 2014 · 3 comments
Open

error on use Dancer2 #19

gingerhot opened this issue May 25, 2014 · 3 comments
Assignees
Labels

Comments

@gingerhot
Copy link
Contributor

hi Jacques,

I just setup the clone following the README, the default Dancer1 is ok. But I want to use Dancer2, then I change the bin/app.pl and lib/MyApp.pm to use Dancer2. and meanwhile I change the cpanfile to require Dancer2.

when I run ' bin/start-dev.pl' , I got nothing from browser, and some error occured at console:

localhost:MyApp binjoy$ bin/start-dev.pl 
2014/05/25-17:07:47 Starman::Server (type Net::Server::PreFork) starting! pid(36507)
Resolved [*]:5555 to [::]:5555, IPv6
Not including resolved host [0.0.0.0] IPv4 because it should be handled by [::] IPv6
Binding to TCP port 5555 on host :: with IPv6
Setting gid to "20 20 20 12 61 79 80 81 98 33 100 204 398 399"
Starman: Accepting connections at http://*:5555/
[MyApp:36513]  core @2014-05-25 17:07:53> looking for get / in (eval 149) l. 2
[MyApp:36513]  core @2014-05-25 17:07:53> Entering hook core.app.before_request in /Library/Perl/5.16/Dancer2/Core/Dispatcher.pm l. 113
[MyApp:36513]  core @2014-05-25 17:07:53> Entering hook core.app.after_request in /Library/Perl/5.16/Dancer2/Core/Dispatcher.pm l. 99
::1 - - [25/May/2014:17:07:53 +0800] "GET / HTTP/1.1" 200 1242 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36"
[MyApp:36515]  core @2014-05-25 17:07:54> looking for get /css/build/style.min.css in (eval 149) l. 2
[MyApp:36514]  core @2014-05-25 17:07:54> looking for get /app/build/app.min.js in (eval 149) l. 2
[MyApp:36515]  core @2014-05-25 17:07:54> Entering hook core.app.before_request in /Library/Perl/5.16/Dancer2/Core/Dispatcher.pm l. 113
[MyApp:36514]  core @2014-05-25 17:07:54> Entering hook core.app.before_request in /Library/Perl/5.16/Dancer2/Core/Dispatcher.pm l. 113
[file_not_found:36515]  core @2014-05-25 17:07:54> Entering hook core.error.init in /Library/Perl/5.16/Dancer2/Core/Error.pm l. 179
[file_not_found:36514]  core @2014-05-25 17:07:54> Entering hook core.error.init in /Library/Perl/5.16/Dancer2/Core/Error.pm l. 179
[file_not_found:36515]  core @2014-05-25 17:07:54> Entering hook core.error.before in /Library/Perl/5.16/Dancer2/Core/Error.pm l. 257
[file_not_found:36514]  core @2014-05-25 17:07:54> Entering hook core.error.before in /Library/Perl/5.16/Dancer2/Core/Error.pm l. 257
[file_not_found:36514]  core @2014-05-25 17:07:54> Entering hook core.error.after in /Library/Perl/5.16/Dancer2/Core/Error.pm l. 268
[file_not_found:36515]  core @2014-05-25 17:07:54> Entering hook core.error.after in /Library/Perl/5.16/Dancer2/Core/Error.pm l. 268
::1 - - [25/May/2014:17:07:54 +0800] "GET /app/build/app.min.js HTTP/1.1" 404 499 "http://localhost:5555/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36"
::1 - - [25/May/2014:17:07:54 +0800] "GET /css/build/style.min.css HTTP/1.1" 404 499 "http://localhost:5555/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36"
[MyApp:36516]  core @2014-05-25 17:07:56> looking for get / in (eval 149) l. 2
[MyApp:36516]  core @2014-05-25 17:07:56> Entering hook core.app.before_request in /Library/Perl/5.16/Dancer2/Core/Dispatcher.pm l. 113
[MyApp:36516]  core @2014-05-25 17:07:56> Entering hook core.app.after_request in /Library/Perl/5.16/Dancer2/Core/Dispatcher.pm l. 99
::1 - - [25/May/2014:17:07:56 +0800] "GET / HTTP/1.1" 200 1242 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36"
[MyApp:36517]  core @2014-05-25 17:07:56> looking for get /css/build/style.min.css in (eval 149) l. 2
[MyApp:36517]  core @2014-05-25 17:07:56> Entering hook core.app.before_request in /Library/Perl/5.16/Dancer2/Core/Dispatcher.pm l. 113
[MyApp:36518]  core @2014-05-25 17:07:56> looking for get /app/build/app.min.js in (eval 149) l. 2
[MyApp:36518]  core @2014-05-25 17:07:56> Entering hook core.app.before_request in /Library/Perl/5.16/Dancer2/Core/Dispatcher.pm l. 113

could you give me some helping on it?
thanks!

@jacqueslareau
Copy link
Owner

I do not use Dancer2 yet. Will have to check this out. Thanks!

@jacqueslareau jacqueslareau self-assigned this May 26, 2014
@jacqueslareau
Copy link
Owner

Just started using Dancer2.

settings.environment is not available in Dancer2. Need to add this line in your env files:
environment: development

@gingerhot
Copy link
Contributor Author

Thanks a lot!
I'll check it to have a try. And after last time I do it from scratch as you had done just for Dancer2, it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants