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

Problems running the scripts #12

Open
phase-t opened this issue Aug 13, 2014 · 1 comment
Open

Problems running the scripts #12

phase-t opened this issue Aug 13, 2014 · 1 comment

Comments

@phase-t
Copy link

phase-t commented Aug 13, 2014

Hey so the main application runs just fine for me, and I'm on ubuntu 14.04 LTS 32 bit.. Running the morbo development server with the mojolite app works just fine.

However, for some reason I am getting errors when I try to run the files that are in the t/ and script/ directories... especially those controller tests, I can't even run t/blogs.t without this error in particular:

~/mojo/MojoExample$ perl t/blogs.t
Can't locate Schema.pm in @inc (you may need to install the Schema module) (@inc contains: ../lib /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at t/blogs.t line 5.
BEGIN failed--compilation aborted at t/blogs.t line 5.

Now most advice I find points me to proper usage of @inc and the use/require statements, so I tried adding "use lib '../lib';" to that file t/blogs.t so that @inc will look in that folder but it makes no difference.

2 months ago, I had it all working, though I recall solving similar issues in the process. When I run the script/generate_schema file, my shell complains about this similar issue with the @inc array:

~/mojo/MojoExample$ perl script/generate_schema
Can't locate DBIx/Class/Schema/Loader.pm in @inc (you may need to install the DBIx::Class::Schema::Loader module) (@inc contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at script/generate_schema line 4.

This problem persists, after having already installed the DBIx::Class::Schema::Loader from CPAN.

Do I have a dependency issue going horribly wrong? I'm banging my head against my desk, hoping that this is just some type of noobie problem with a quick fix... 2 months ago, I was able to run the controller tests and populate the test.db with my modifications to the fixtures. Now all of sudden the @inc array is just whipping me back lol. I just reinstalled ubuntu to clean my kernel up but the same problems are persisting.

Any time and attention to these matters is greatly appreciated. I appologize if I cause any face-palming, heh..

@mohawk2
Copy link

mohawk2 commented Oct 31, 2017

In case anyone else has this; have you tried:

cpanm --installdeps .
prove -l t

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

2 participants