How to add a local git branch to the remote repository and keep the two tracked together.

Assuming you already have the remote repo setup, it’s pretty simple to add a new local branch to the remote repo.

git push -u origin branch-name

Getting ready to launch

It’s been quite a while in the making, but I’m pleased that Butterware is now really getting started. We’re officially launching the beta at the Lunch! show in London at the end of September 2011.

I’ve been busy trying to find ways of reaching our target audience – sandwich shops – and it’s quite tricky. Most sandwich shops are independent and very few of them have a web presence currently. While that’s good for business potentially, it also makes it quite hard to get in touch. I’ve found quite a few that have websites but don’t advertise an email address. Basic error!

It’ll be interesting to find out how well word of mouth serves us. Once we’ve got a few shops up and running will other shops sit up and take notice, or just carry on in their own world blindly?

I’m now following quite a few sandwich shops on Twitter. Partly so they know we exist, but also to help us get a feel for what goes through the mind of the average sandwich business. Fillings? I figure that any shop with a Twitter account must be quite a bit more Internet savvy.

Using Xeround with Heroku the cheaper way

The default choice with Heroku is to enable Xeround as a flat fee option, currently $70 per month. This is quite expensive if you only have a small db and would like to take advantage of Xeround’s normal pay-per-use pricing plan.

But thankfully there is an answer. Create a DB instance with Xeround the normal way, and then connect your Heroku app to it directly, without using the Heroku Add-on.

The magical chant to use is as follows….

$ heroku config:add DATABASE_URL=mysql://username:password@host:port/databasename 

Done.

Auto-clearing a hint in a text box

Done just like this guy says

RVM

As I’m starting to have different projects with different ruby requirements, I’ve installed RVM. Combining rvm and bundler is incredibly useful for keeping everything working.

Link

RVM and Ubuntu

Had problem – fixed it

/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to load -- readline (LoadError)

Heroku and the little memory hogs

I’ve moved a site over to Heroku in the last week. I’ve been very impressed so far, and generally it’s been very smooth. But as with any new system there are teething problems. One of these is that I’m rather limited to what I can do on the console. I quite often run out of memory on requests. And I’m a tad concerned that the same requests also crash when run in an automatic fashion, although the limit is higher when done like that.

So it’s time for yet another reminder link I’m afraid. This one courtesy of Ryan.

Update – I found the code samples here to be of great help too.

Styling for pagination

I’ve been using the will_paginate gem today, I was pleased to find some ready made CSS for it. The will_paginate output looks fairly ugly out of the box, so it’s pretty handy.

Need to come back to this one

It may well be useful in future!

http://blog.wyeworks.com/2009/8/10/scheduling

Rails logging

I’m not sure when I’ll need to use this link, but it looks very useful so it gets a post.