Category: RubyOnRails
-
Passing current user id to Rails models
Long time since last post, isn’t it? Well, I’m completely busy with my work in Nettigo, selling Arduinos and other nice gears :) I do not do gigs anymore, so there is a lot less reasons to write about Rails. But I still use this framework, since my backend software is written in Rails, so…
-
ActiveMerchant: dumping traffic between Your app and payment gateway
Just a quick note – if You need to dump all traffic between payment gateway and Your application using ActiveMerchant just add to Your development.rb: ActiveMerchant::Billing::QuantumGateway.wiredump_device = File.open(“/tmp/q.log”, “a+”) ActiveMerchant::Billing::QuantumGateway.wiredump_device.sync = true Just remember – it will work ONLY You have one application instance, since it uses simple file handle to write all traffic. And…
-
ArgumentError: marshal data too short when loading session data
I was stuck for a while when application maintained by me have started to throw ArgumentError: marshal data too short errors in random places When user have encountered that problem then it was unable to use application at all. Logs were showing that it happens when Rails was trying to create session object. Session store…
-
Ruby for Startups
I’ve found this interesting – a bunch of info from Mike Subelsky (creator of OtherInbox) how to use Ruby and Rails in challenging startup environment (each startup’s environment is challenging :)) ) Ruby For Startups View more presentations from subelsky.
-
Extracting fixtures
I’m still using fixtures. Shame, I know. Why I do use them instead of Factory Girl or other solution like that? Well, fixtures can be much more closer to real data than mocks from Factory. How come, You ask? Fixtures are imaginary data exactly like mocks from other sources! My answer is: that depends how…