How do I get started with the MVC 3.0 Razor Version

May 24, 2011 at 1:20 PM

I have MCV 3.0 installed and I can open and build the solution. However when I try to run the solution I get the following error:

Microsoft JScript runtime error: '_gat' is undefined

I believe this is probably due to missing some packages form nuget, but which one?

Coordinator
May 24, 2011 at 1:29 PM

Hey Allen,

'_gat' is a part of the Google Analytics code that is included in the project. Since you're having troubles with that, you may also have troubles with the UserVoice js too. Here's how to remove those external dependencies from the project.

In the 'Branches\VS2010-MVC3-Razor\NerdDinner\Views\Shared' directory open the _Layout.cshtml file.

Remove (or comment out) the following lines:

<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>

<script src="http://cdn.uservoice.com/javascripts/widgets/tab.js" type="text/javascript"></script>

AND

        <script type="text/javascript">
            var pageTracker = _gat._getTracker("UA-6399325-1");
            pageTracker._initData();
            pageTracker._trackPageview();
        </script>



        <script type="text/javascript">
            UserVoice.Tab.show({
                key: 'nerddinner',
                host: 'feedback.nerddinner.com',
                forum: 'general',
                alignment: 'right', /* 'left', 'right' */
                background_color: '#A2CC3B',
                text_color: 'white', /* 'white', 'black' */
                hover_color: '#7A0100',
                lang: 'en' /* 'en', 'de', 'nl', 'es', 'fr' */
            });
        </script>

 

Hopefully that will get you going!

Thanks!

Sep 8, 2011 at 5:50 AM

I got a copy from https://nerddinner.svn.codeplex.com/svn/Trunk but all referenced libraries were missing. I could not build. Where are libraries? I also looked around but didn't see them anywhere in ND's SVN repository.

Coordinator
Sep 8, 2011 at 2:28 PM

Tiendq,

We use a technique that David Ebbo blogged about that allows us to NuGet to get the references without having to put all the package sources in the SVN repo. 

Is NuGet installed on the machine you're pulling source to?

IS there a .nuget directory in the root of your Nerd Dinner directory?