Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [Symfony][SF2]Cannot import resource
amii
post 17.02.2013, 15:58:11
Post #1





Grupa: Zarejestrowani
Postów: 728
Pomógł: 76
Dołączył: 12.06.2009

Ostrzeżenie: (0%)
-----


Chcę odpalić swoją pierwszą testową aplikację pod Symfony2 i mam taki problem po wejściu na stronę główną pojawia się komunikat:

Cannot import resource "@AcmeDemo/Resources/config/routing.yml" from "C:/xampp/htdocs/aukcje/app/config/routing.yml". Make sure the "AcmeDemo/Resources/config/routing.yml" bundle is correctly registered and loaded in the application kernel class.

Plik app/config/routing.yml

Cytat
AcmeDemoBundle:
resource: "@AcmeDemo/Resources/config/routing.yml"
prefix: /



Plik src/Acme/DemoBundle/Resources/config/routing.yml

Cytat
hello:
pattern: /hello/{name}
defaults: { _controller: AcmeDemoBundle:Hello:index }



Plik app/AppKernel.php
  1. class AppKernel extends Kernel
  2. {
  3. public function registerBundles()
  4. {
  5. $bundles = array(
  6. new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
  7. new Symfony\Bundle\SecurityBundle\SecurityBundle(),
  8. new Symfony\Bundle\TwigBundle\TwigBundle(),
  9. new Symfony\Bundle\MonologBundle\MonologBundle(),
  10. new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
  11. new Symfony\Bundle\AsseticBundle\AsseticBundle(),
  12. new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
  13. new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
  14. new JMS\AopBundle\JMSAopBundle(),
  15. new JMS\DiExtraBundle\JMSDiExtraBundle($this),
  16. new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
  17. );
  18.  
  19. if (in_array($this->getEnvironment(), array('dev', 'test'))) {
  20. $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
  21. $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
  22. $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
  23. $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
  24. }
  25.  
  26. return $bundles;
  27. }
  28.  
  29. public function registerContainerConfiguration(LoaderInterface $loader)
  30. {
  31. $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
  32. }
  33. }


--------------------
gry flash online
Dobry hosting i tanie odnowienia domen firma: masternet.
Zarabianie bez wysiłku na domenach bez ruchu: prolink.
Go to the top of the page
+Quote Post
szok
post 17.02.2013, 16:09:41
Post #2





Grupa: Zarejestrowani
Postów: 165
Pomógł: 20
Dołączył: 2.03.2006

Ostrzeżenie: (0%)
-----


Jak uruchamiasz strone?

localhost/costam/web/app.php
czy app_dev.php ?
Bo BUndle acme jest tlyko jak wchodzisz na dev.

Oraz w YML użyć tabulacji:
Kod
hello:
    pattern: /hello/{name}
    defaults: { _controller: AcmeDemoBundle:Hello:index }


--------------------
Go to the top of the page
+Quote Post
amii
post 17.02.2013, 16:21:54
Post #3





Grupa: Zarejestrowani
Postów: 728
Pomógł: 76
Dołączył: 12.06.2009

Ostrzeżenie: (0%)
-----


Uruchamiałem przez app.php tak mam virtual host skonfigurowany:
Ale przez app_dev.php też sypie tym samym błędem

Cytat
<VirtualHost *:80>
ServerName dev.aukcje
DirectoryIndex app.php
DocumentRoot "C:/xampp/htdocs/aukcje/web"
<Directory "C:/xampp/htdocs/aukcje/web">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

SetEnv APPLICATION_ENV "development"

ErrorLog C:\xampp\apache\logs\aukcje-error.log
CustomLog C:\xampp\apache\logs\aukcje-access.log combined
</VirtualHost>


--------------------
gry flash online
Dobry hosting i tanie odnowienia domen firma: masternet.
Zarabianie bez wysiłku na domenach bez ruchu: prolink.
Go to the top of the page
+Quote Post
Szymciosek
post 17.02.2013, 16:34:20
Post #4





Grupa: Zarejestrowani
Postów: 1 168
Pomógł: 126
Dołączył: 5.02.2010
Skąd: Świdnica

Ostrzeżenie: (0%)
-----


Wczoraj z xampp miałem problemy, ale ogólnie bo stworzeniu czystego projektu, gdzie uruchamia się demo wszystko działało.

Mógłbym na to zerknąć poprzez np TeamViewer.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 02:02