Although the build was successful an error occured when viewing the site becuase it couldn’t connect to the attached database.
To fix this we need to create a SQL Server Database in Appharbor.
On the AppHarbor application management page click the link to ‘Add database’
Next choose SQL Server as the database type, enter a connection string name and click the create button.
I used the same connection string name used by Entity Framework 4 in the ASP.NET MVC Music Store application.
The following screen shows you what connection string should be used in your config file and information about how to connect to the Appharbor database from Microsoft SQL Server Managemnt Studio.
When you connect to the database in Microsoft SQL Server Managemnt Studio you’ll see the database is empty.
In the Assets/Data folder in the ASP.NET MVC Music Store you’ll find a ‘MvcMusicStore-Create.sql’ SQL script which can be used to create and populate the tables required by the application.
Before running the script delete the first line that looks like this
USE [C:\USERS\JON\DOCUMENTS\JON-SHARE\MVCMUSICSTORE-MVC3\MVCMUSICSTORE\MVCMUSICSTORE\APP_DATA\MVCMUSICSTORE.MDF]
When the script has been completed successfully the tables will have been created and populated
About two months ago I heard about Heroku, a hosting service which can host Ruby apps in the cloud for free.
I was envious that Ruby folk could do away with traditional hosting solutions and move to a cloud platform that was fresh, modern and simple to use.
Without paying a penny you get one dyno which handles concurrent HTTP requests which you can easily scale up by adding additional web or background processors without breaking the bank.
Used in conjunction with Jekyll, a static web site generator, one dyno should be adequate for most people’s needs.
So I started putting together a site for my new company.
This was great except I needed to do some custom tasks which meant creating Ruby extensions… which meant I had to learn Ruby.
What if I said that you could push code up to AppHarbor and see changes on your live site within minutes or that AppHarbor only deploys changes to your live site if the build and unit tests are successful?
It’s clever stuff, you’ve effectively got a free continuous integration server in the cloud!
You can even go back and deploy old versions if you ever need to.
AppHarbor is still new so they are missing a couple of useful features at the moment. But they are getting better all the time.
Questions in the support forum and answered quickly, and they really do seem to be listening to the community.
I’ve already moved my company ASP.NET MVC site over and will be writing more about AppHarbor next week.