just in ram

A list of stuff I should remember but never do

Archive for the ‘General’ Category

Building FubuMVC with a portable version of rake

with one comment

To build FubuMVC you need to install ruby, rake etc. Unfortunately for me the firewall at work will not allow me to get the rake gem (I’ve downloaded gems before using the HTTP_PROXY setting before but no luck this time). Any hoose I remember reading Stephen Balkum post on packaging up Rake as an executable.  I followed Stephens guide and created a portable rake package which got around my firewall problem but FubuMVC required another gem rubyzip to allow a build.

Adding another gem

Luckily using Stephen’s guide its really easy to add extra gems, you just need to have them installed before you build your exe. So we follow the first part of the process outlined in Stephen’s guide then do the following:

NOTE: In this case we need rubyzip but it could be any old gem.

  • Download rubyzip and extract to contents to c:\rubywork\zip
  • To install rubyzip, at a command prompt in c:\rubywork\zip, run ..\ruby\bin\ruby install.rb
  • Download zlib and extract the zlib1.dll to C:\rubywork\ruby\lib\ruby\1.8\i386-mswin32
  • Rename zlib1.dll to zlib.dll (rubyzip required this extra dll other gems may not)

Now continue part two of the process from Stephen’s guide to compile your very own allinoneruby.exe which includes, rake and rubyzip.

You should now have allinoneruby.exe and rake.rb file.

Building FubuMVC

We can now drop these files into to the FubuMVC project under the build support folder:

image

We need a helper batch file in the root folder of FubuMVC called rake.bat which contains:

@.\build_support\allinoneruby.exe .\build_support\rake.rb %*

This will be called when we run the build.

Run the build already

Drop to the command prompt and cd into the FubuMVC project root and simply type build. You should get something like:

image

Download

Don’t want to go through all that? You can download my version of portable rake here (I don’t think I’m breaking any licensing agreements here, this is all open source software. If I am let me know and I’ll remove the link)

DISCLAIMER: I offer no guarantees I can only confirm this works on my machine!

One final note

I’ve used this method to build some of the other open source projects out there which use rake (all the cool kids seem to be using rake) and so far I’ve not had any problems. This could be pretty frictionless way to introduce rake to a team of .net developers who don’t want the overhead of installing ruby on their machines. Just add it to a tools folder check it in to source control they’ll never know!

Written by Justin Ramel

June 19th, 2009 at 3:55 pm

Posted in FubuMVC, General

Tagged with

HOWTO: Download and run Microsoft Report Builder 1.0

with 2 comments

Assuming you have an SQL Server 2005 running reporting services you can run Report builder as a ClickOnce app using the following url:

http://<servername>/reportserver/reportbuilder/reportbuilder.application

Written by Justin Ramel

May 20th, 2009 at 4:58 pm

Posted in General

Tagged with

TortoiseSVN + Global ignore pattern

without comments

Tortoise
build_log.xml *.suo *.user _ReSharper* *.resharper bin obj class build

Written by Justin Ramel

October 10th, 2007 at 1:37 pm

Posted in General, Programming

Tagged with ,

SAP Portal Developer Guide

with 7 comments

Looking for help on the SAP Portal? HTMLB syntax and lots of other goodies this way…

SAP Portal Developer Guide

Written by Justin Ramel

December 5th, 2006 at 12:26 pm

Continuous Integration + CruiseControl.Net + Subversion + MSBuild + .Net 2.0

with 10 comments

I’ve read quite a bit about Continuous Integration and the .Net implementation CruiseControl.Net. It always seemed like a really good idea but I’ve never gotten around to trying it out, until now…

By the way setting up the server was a lot easier than I thought it would be! Here’s what I did:

CruiseControl.Net Setup

Download and run CruiseControl.Net setup

http://sourceforge.net/project/showfiles.php?group_id=71179&package_id=83198

I’ve used version 1.0.1:

CruiseControl.NET-1.0.1-Setup.exe

NOTE: After setup if your server has .Net 1.1 and 2.0 as mine did you may need to change the ccnet website to use .Net 2.0. This can be done through the IIS control panel, get the properties of the ccnet site and change via the ASP.NET tab.

Subversion Client

Your server will need the subversion console client on the server to allow CruiseControl to checkout your source.

http://subversion.tigris.org/

.Net 2 SDK

To allow us to build .Net 2 projects without the need for Visual Studio we need to download and install .Net 2 SDK onto the server

http://www.microsoft.com/downloads/details.aspx?familyid=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en

Setup MSBuild

To use MSBuild with CC.Net we need the logger dll -ThoughtWorks.CruiseControl.MsBuild.dll from:

http://ccnetlive.thoughtworks.com/MSBuildXmlLogger%2DBuilds/

Download and copy to:
C:\Program Files\CruiseControl.NET\webdashboard\bin\

Directory structure

Setup your directory structure:

C:\CI\Myproject\
C:\CI\Myproject\build
C:\CI\Myproject\logs

Using your subversion client checkout source to C:\CI\MyProject\build

ccnet.config

Add the project config to ccnet.confg:

<cruisecontrol>
 <project name="MyProject">
  <!-- after a change is detected, wait 10 mins and then kick off the build-->
  <schedule type="schedule" sleepSeconds="600" />
  <!--set the sourcecontrol type to subversion and point to the subversion exe-->
  <sourcecontrol type="svn">
   <executable>C:\Program Files\Subversion\bin\svn.exe</executable>
   <workingDirectory>C:\CI\MyProject\build</workingDirectory>
   <trunkUrl>svn://svnserver/MyProject/trunk</trunkUrl>
   <autoGetSource>true</autoGetSource>
   <username>myuser</username>
   <password>mypassword</password>
  </sourcecontrol>
  <tasks>
   <!-- Configure MSBuild to compile the updated files -->c:\
   <msbuild>
    <executable>C:\windows\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe</executable>
    <workingDirectory>C:\CI\MyProject\build\src\</workingDirectory>
    <projectFile>MyProject.sln</projectFile>
    <buildArgs>/noconsolelogger /p:Configuration=Debug</buildArgs>
    <targets></targets>
    <timeout>15</timeout>
    <logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,C:\Program Files\CruiseControl.NET\webdashboard\bin\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
   </msbuild>
  </tasks>
  <!--Publishers will be done after the build has completed-->
  <publishers>
   <xmllogger>
    <logDir>C:\CI\MyProject\Logs</logDir>
   </xmllogger>
  </publishers>
  <modificationDelaySeconds>10</modificationDelaySeconds>
 </project>
</cruisecontrol>

CC Tray

You will also want to install the CC Tray monitoring software on your pc:

CCTray

It will allow you to keep an eye on the server from the comfort of your own pc.

That’s it we’re down!

Written by Justin Ramel

July 20th, 2006 at 10:20 am

Posted in General

Subversion server + windows + backup

without comments

So you want to backup your repository?

Unfortunately you cannot do a straight backup of your repository as someone may have a file open/locked which will cause problems on restore. So you should do a “hot copy” to prevent any locking issues when the actual backup is made. My “hot copy” is created using the following batch file:

REM Reset hot copy
rmdir /S /Q c:\\svnrepos_hotcopy
mkdir c:\\svnrepos_hotcopy

REM Initiate SVN backup. Use svadmin hotcopy --help for details
svnadmin hotcopy c:\\svnrepos c:\\svnrepos_hotcopy --clean-logs

I run this batch file daily as a scheduled task before the actual backup.

This batch file is a modification of the batch file described over at:

Blended Technologies

Written by Justin Ramel

May 3rd, 2006 at 10:46 am

Posted in General

Ruby unit testing – Setting up your project folder for testing

without comments

Its a good idea to keep your test cases seperate from your production code:

  myproject
      lib/
          workomatic.rb
      test/
          test_workomatic.rb

When you have your project setup in this way add the following line to the top of your test cases:

Inside test_workomatic.rb

  $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
  require workomatic.rb

Now when you run this test case the workomatic.rb file and all supporting files in the lib folder will be picked up.

Written by Justin Ramel

March 30th, 2006 at 9:22 pm

Posted in General

My first wordpress post

without comments

I’ve defected from blogger.com, so far I’m impressed. Categories, stats, lots of nice skins and the import feature just saved me a boat load of time!

Written by Justin Ramel

February 28th, 2006 at 5:07 pm

Posted in General

My first post

without comments

I hope to use this every day but who knows this might be my only post!

Written by Justin Ramel

February 21st, 2006 at 5:17 pm

Posted in General