Coding Like A Bitch: Mephisto Plugins Upgraded and Fridaycities/EventWax Beta Biznizz

Just a quick note to say that I’ve just upgraded to the newest version of Mephisto which has forced me to update my Mephisto plugins to work with the new updates to Liquid. Sorry for being slack on that. I’ve had a ton of email about it but hadn’t had the chance to fix these since my new venture into the freelance world has started.

In unrelated news, most of my coding effort has been going into a site called Fridaycities which is a cool site where Londoners ask questions and get insider info about all things London-ish. It’s great to browse around…Apparently there’s an Elvis Chinese restaurant on Old Kent Rd and a naked disco in Vauxhall. Who’d a thunk it? It’s still in very early stages at the moment but the FC people have got big plans and myself and Mr Tanner are beavering away on it as we speak. It’s invite only but you can check out the posts without registering so go have a squizz.

Finally, EventWax has been going great guns. It’s great to see a load of events running on there including @media2007 and BarCampLondon2. We been collecting lots of feedback and slowly introducing features but there’s going to be some cool changes in the near future so keep an eye out there.

Finally, I’m stacking up a few patches for Prototype and Rails that I need to finish up. Hopefully I’ll get chance to do that soon. Writing patches for Rails is weird. I tend to find myself spending 20 seconds on getting the patch done and 3 hours trying to bash tests together. Does anyone else find writing tests for the Rails core a bit of a pain in the arse?

16 Comments (Closed)

Hey, I just updated my trunk and installed the delicious plugin, and while mephisto now recognizes the liquid tag, I get a mile-long list of errors (instead of it just not recognizing the tag). It says its a liquid error that has issues with many files and many lines in ruby and mephisto. Ideas?

LizLiz at 31.01.07 / 19PM

I’m not seeing the same problem as Liz but I am seeing the following:

‘Liquid error: wrong number of arguments (2 for 3)’

My template code looks like:

  {% delrecentlinks tag: '' as link, count: '10' as count %}
  <li><a href="{{ link.href }}">{{ link.description | escape_html }}</a> {{ link.extended }}</li>
  {% enddelrecentlinks %}

ScottScott at 01.02.07 / 06AM

Yup. Same as Scott.

KevinKevin at 01.02.07 / 07AM

Liz: If you pastie me what code you have in your template and what the error is I’ll take a look.

Scott: I’m not sure this is what causing your problem but your syntax is a bit wrong:

{% delrecentlinks count: 10 as link %}

Is more like what it should be.

In general though it looks as though your (and Kevin’s) Mephisto installation may not be new enough now :) Liquids API seems to be a bit of a moving target at the moment so there’s not much I can do about this. Try upgrading to the newest version of Mephisto.

DanDan at 01.02.07 / 08AM

I have the latest stable. What I’m wondering if the install is happening properly. For instance, I used the command:

script/plugin install…/trunk/

Which is different that what the readme says, but what is listed mephisto wiki.

It installs everything into a folder call trunk under vendor/plugins

Thanks for your time Dan—i feel this is an important plugin to the adoption of mephisto.

KevinKevin at 01.02.07 / 14PM

Thanks for the tip Dan. It didn’t end up panning out for me (I tried with a clean trunk version of Mephisto, the latest plugin along with the latest edge Rails), but I managed to fix the problem anyway.

“Moving target” sounds about right ;-)

ScottScott at 01.02.07 / 16PM

@Scott: What’d you do to resolve it?

KevinKevin at 01.02.07 / 16PM

@kevin: I emailed scott for the same reason, and this worked for me as well:

change line 13 in the recent_links.rb file from:

def initialize(tag_name, markup, tokens)


def initialize(markup, tokens)

JaredJared at 03.02.07 / 03AM

Jared: It seems that Liquid’s API has very recently changed because thats how the plugin was before but when I ran in with edge Mephisto (as this site is on) it complained about the wrong number of arguments so I added in the tag_name argument.

Seems that the Liquid guys are making some crazy changes at the moment. Still, thanks for posting the solution here. Hopefully people will find it useful.

DanDan at 03.02.07 / 11AM

Does anyone else find writing tests for the Rails core a bit of a pain in the arse?

You kidding? ;)

Tim LucasTim Lucas at 06.02.07 / 22PM

I totally agree Dan, writing tests for Core Rails is a pain … :-)

Sandro PaganottiSandro Paganotti at 07.02.07 / 22PM

Hi, unfortunately I get the following error:

Liquid error: Request failed with error: undefined method `use_ssl=' for #&lt;Net::HTTP open=false

I’ using latest mephisto and as well as latest delicious plugin.

Any help appreciated. Regards, theworkisdone

theworkisdonetheworkisdone at 13.02.07 / 16PM

Okay, so I tried installing and tried the change suggested in the comments… it can’t seem to locate the plugin. In the production.log I get a SyntaxError (Unknown tag ‘delrecentlinks’):...

and then a 500 error. Any thoughts on why that might be happening? I am using Mephisto 0.7.3

akatsukiakatsuki at 18.02.07 / 21PM

I keep getting the error:

Liquid error: Request failed with error: #

then a big long stack trace and

Declarations can only occur in the doctype declaration. Line: Position: Last 80 unconsumed characters:

it doesn’t say which characters…

PeterPeter at 23.02.07 / 16PM

Hi Peter,

I was getting this error too – a little debugging later and I found that the response was being returned from delicious saying I wasn’t authenticated;

“this server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn’t understand how to supply the credentials required.”

Tracing out the username and password around line #81 of delicious.rb – I found that they were blank; so I set the auth (line 38) to;

@@auth = {:username => ‘myusername’, :password => ‘mypassword’}

Seemed to work ok from then on.

MattMatt at 25.02.07 / 22PM

Hi Matt / Peter,

Actually, there’s a nice way to do that thats detailed in the README file.

MephistoDelicious.authenticate :username => 'xxx', :password => 'xxx'

DanDan at 25.02.07 / 23PM

About This Article