About this error I found a solution changing in the file  "vendor/
bundles/Sensio/Bundle/GeneratorBundle/Manipulator/
RoutingManipulator.php"
in the addResource method by this:

    public function addResource($bundle, $format, $prefix = '/', $path
= 'routing')
    {
        $code = sprintf("%s:\n", $bundle.('/' !== $prefix ?
'_'.str_replace('/', '_', substr($prefix, 1)) : ''));
        if ('annotation' == $format) {
            $code .= sprintf("    resource: \"@%s/Controller/\"\n
type:     annotation\n", $bundle);
        } else {
            $code .= sprintf("    resource: \"@%s/Resources/config/%s.
%s\"\n", $bundle, $path, $format);
        }
        $code .= sprintf("    prefix:   %s\n", $prefix);

        $code .= "\n";


        if (file_exists($this->file)) {
            $codeInFile = file_get_contents($this->file);
        } elseif (!is_dir($dir = dirname($this->file))) {
            mkdir($dir, 0777, true);
        }

        // Don't add same bundle twice
        if (false !== strpos($codeInFile, $bundle)) {
            throw new \RuntimeException(sprintf('Bundle "%s" is
already imported.', $bundle));
        }

        $code = $code.$codeInFile;

        if (false === file_put_contents($this->file, $code)) {
            return false;
        }

        return true;
    }

--
I hope this could be help,


From: Cas Leentfaar <[email protected]>
Date: Tue, 5 Jul 2011 00:31:42 -0700 (PDT)
Local: Tues, Jul 5 2011 9:31 am
Subject: [Symfony2] Automatic update of routing fails since RC4
Reply | Reply to author | Forward | Print | Individual message | Show
original | Report this message | Find messages by this author
Thanks mr Potencier for fixing my earlier ticket so fast (TOW only
two
dots allowed in filenames of templates)! I feel honored to be helped
by the people I admire!
This morning I happily tried the new release candidate (4) and
stumbled on this one:
Upon generating a bundle using the console, the last step of the
process fails (see below)
<EXAMPLE START>
Confirm automatic update of the Routing [yes]?
Importing the bundle routing resource: FAILED
  The command was not able to configure your everything
automatically.
  You must do the following changes
manually.
Bundle TestFoobarBundle is already imported.
<EXAMPLE END>
I have tried using different names and clean distributions
(installations) for each case
This happened since RC4, but it may have been in the code longer
because RC3 also had problems generating a bundle (addition of the
'structure' folder in a filepath was the cause)
Hope this helps this lovely product move on!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to