22 Apr 2015, 16:19

did I run my migrations?
XXX lists XXX

Today I had an error message driving me crazy:

 `method_missing': undefined method `export_format' for XXX model

You see, our model is a gem itself, because it is shared by several projects. When we have something in the schema that is not in the database, that is the error we get.

Now, I knew this error from previous executions, but my model was in synch with the DB.

I tried to comment out all my changes, without luck.

Until I realized. This error was in my specs.

I had run the rake db:migrate, but not RACK_ENG=test

In this situation I was happy I fixed the issue, but at the same time extremely angry I wasted 1h with that

Mental note: run both friggin migrations together in the future!

This might help:

alias migrate='rake db:migrate; rake db:migrate RAILS_ENV=test'

thanks to Eumir for this post

07 Nov 2012, 17:29

Raspberry pi + ruby + sinatra = #winning
XXX lists XXX

There is something about hardware/low level development that amazes me. I am not really good at it, I don’t actually want to be, my relation with hardware is the same I have with sports: I love to learn new sports, practice it a little bit, but when it starts to get too competitive, ie, the guys are getting serious about it, I loose interest.

That being said, I have to say I’ve played a lot with this things. The first one was the pic. I friend of mine(electric engineer) helped me to get started and to like it. The next step was to upgrade(or is it downgrade?) to arduino, a platform much easier than pic, and that comes ready for development. I got a lot of fun with that, but then when I’ve moved to london, I brought just the essential, so it was left behind.

But when I read about the new raspberry pi, got all excited again! I would be finally able to create high level code and run it in a computer with the size of a credit card. Then you ask: but master, how can I do that???

Simple little grasshopper, you just have to have a pi and a little patience. step1: install ruby; step2: install sinatra; step3: install node.js, and this is the tricky one, I had no idea it was needed… run your code and GG!

Now, making your rasp visible to the outer world… that is for another post. ps: It involves changing your router settings, and that…. that is enough to make me sad…