tag:blogger.com,1999:blog-14375121585107405372024-03-20T11:08:55.794+01:00Through VoidnessCruising the vacuity of life, hacking, space ...Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-1437512158510740537.post-52739128669909704482017-02-09T18:14:00.002+01:002017-02-09T18:14:27.941+01:00Rails 5 web console and Docker dev env.If you use Rails 5 along docker for your development environment you may have seen something like this within your logs :<br />
<br />
<br />
<pre>Cannot render console from 172.17.0.x! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
</pre>
<div>
<br />
To allow your current docker network to access the web console you should add some discovery logic within your config/environments/development.rb file.</div>
<pre>
require 'socket'
require 'ipaddr'
config.web_console.whitelisted_ips = Socket.ip_address_list.reduce([]) do |res, addrinfo|
addrinfo.ipv4? ? res << IPAddr.new(addrinfo.ip_address).mask(24) : res
end
</pre>
Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com0tag:blogger.com,1999:blog-1437512158510740537.post-36682761155076756482015-02-18T11:22:00.002+01:002015-02-18T11:22:39.943+01:00DIY Infrared Head TrackingI just built my own Head tracking device, it works like a charm, even with high luminosity on the white wall behind me !<br />
<br />
Here is the path i followed :<br />
<ul>
<li>Will use 3 point tracking since it gives good performances and low latency.</li>
<li>Will use infrared lights spots ( to be able to track in daylight )</li>
<li>Will use my webcam with IR filters to track spots.</li>
<li>Will use FaceTrackNoIR as it provides most usefull protocols.</li>
</ul>
<div>
<br /></div>
<h4>
Bills of materials</h4>
<br />
<ul>
<li>3 x OSRAM - LD271 - IR 5MM 950N</li>
<li>1 x 5.6 ohm 1/4W Resistor ( Green Blue Gold)</li>
<li>1 x USB cable</li>
<li>1 x USB > AC Converter ( Optional )</li>
</ul>
<br />
<br />
<h4>
Electric Array</h4>
The electric array will look like this :<br />
<pre> +----|>|----|>|----|>|---/\/\/----+ R = 5.6 ohms</pre>
<br />
<br />
Weld in series the LED and the Resistor.<br />
Then weld circuit to USB cable.<br />
<h4>
<br /></h4>
<h4>
3 points home made head clip</h4>
You need a chassis to mount led, It should be an 'L' shape. See picture below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://docs.google.com/drawings/d/1zVcPK8IvhyuquUiThUlbTji6trJrxANJ1vVqxpY1r_w/pub?w=480&h=360" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://docs.google.com/drawings/d/1zVcPK8IvhyuquUiThUlbTji6trJrxANJ1vVqxpY1r_w/pub?w=480&h=360" width="320" /></a></div>
I used a thin metal bar that I forged to my own taste.<br />
<br />
<h4>
IR Receiver</h4>
Next IR receiver: I used a Webcam with 5 pieces of negative photograpric film as IR filter. ( More film allow better filtering )<br />
<br />
<h4>
Result</h4>
I've mounted the whole on my headset , that's all, a full functionnal head tracking device < 10 €<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy6ozc_N5SKKzXavBgXNzCts5NjYcbuROvS4GEs_rEt6IN5fkxHtsROWxiRbeGX0SUk9-ipz62uA0diueKItm42-_r37Zhcgffwq6T8aKoJdtVuwRi3aoIUCJrGCHuVWX8a_5UER4Ianc/s1600/IMG_20150218_105847.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy6ozc_N5SKKzXavBgXNzCts5NjYcbuROvS4GEs_rEt6IN5fkxHtsROWxiRbeGX0SUk9-ipz62uA0diueKItm42-_r37Zhcgffwq6T8aKoJdtVuwRi3aoIUCJrGCHuVWX8a_5UER4Ianc/s1600/IMG_20150218_105847.jpg" height="180" width="320" /></a></div>
<br />
<br />
Next I'll build my DIY Virtual Reality headset …Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com1Rezé, France47.190616 -1.569382000000018747.1042635 -1.7307435000000186 47.276968499999995 -1.4080205000000188tag:blogger.com,1999:blog-1437512158510740537.post-56500103868307871542014-08-04T18:16:00.002+02:002014-08-08T10:09:53.447+02:00Rmagick and Archlinux imagemagick HDRI enabled package.Earlier versions of Rmagick will not compile with newer version of imagemagick with <span style="font-family: Courier New, Courier, monospace;">--enable-hdri</span> compilaton flag.<br />
<br />
The first recommandation would be to upgrade your library to the newest version (=< 2.13.3), but for some reasons sometime it is not possible yet. <br />
<br />
If you are Archlinux user you'll probably end with an error message like :<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">Can't install RMagick 2.13.2.</span><br />
<span style="font-family: Courier New, Courier, monospace;">RMagick does not work when ImageMagick is configured for High Dynamic Range Images.</span><br />
<span style="font-family: Courier New, Courier, monospace;">Don't use the --enable-hdri option when configuring ImageMagick.</span><br />
<div>
<br /></div>
<div>
If you google a bit, you'll find the imagemagick-no-hdri AUR package.</div>
<div>
Unfortunately is does not seem up to date.</div>
<div>
<br /></div>
<div>
I've tweak the PKGBUILD in order to bring a <a href="https://github.com/Electron-libre/imagemagick-no-hdri/blob/master/PKGBUILD" target="_blank">newer version of imagemagick-no-hdri</a></div>
<div>
<br /></div>
<h4>
Installation :</h4>
<div>
Remove the base package :</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">sudo pacman -Rdd imagemagick</span></div>
<div>
<br /></div>
<div>
Download and build <a href="https://github.com/Electron-libre/imagemagick-no-hdri/blob/master/PKGBUILD" target="_blank">my no-hdri version</a> :</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">wget https://raw.githubusercontent.com/Electron-libre/imagemagick-no-hdri/master/PKGBUILD</span></div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">makepkg</span></div>
<div>
<br /></div>
<div>
Install the package :</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">sudo packman -U imagemagick-no-hdri-6.8.9.6-1-x86_64.pkg.tar.xz</span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Edit : I've made an Aurball, <a href="https://aur.archlinux.org/packages/imagemagick-no-hdri/" target="_blank">the new package is now available on AUR </a></div>
Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com1Nantes, France47.218371 -1.55362100000002147.045877499999996 -1.876344500000021 47.3908645 -1.2308975000000211tag:blogger.com,1999:blog-1437512158510740537.post-6347484255946333762014-06-19T11:56:00.002+02:002014-06-19T12:01:17.924+02:00OpenERP xmlrpc API for Ruby : BintjeFew month ago, I released Bintje, a minimal interface to OpenERP's xmlrpc API:<br />
<br />
<a href="https://github.com/Electron-libre/bintje">It is available on github</a>, as a ruby gem, and can be included in the ruby class of your choice ( as a Rails model for example ). <br />
<br />
It still an early version, but is usable in production.<br />
<br />
<h4>
Why Bintje ?</h4>
<br />
So why it is named Bintje ? Because it is part of a bigger piece of architecture called "Barakafrites" which in french means this :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://legacy.lunion.presse.fr/media/imagecache/article-taille-normale/protec/2011-09/2011-09-14/201109144e701d6ae62c1-0.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://legacy.lunion.presse.fr/media/imagecache/article-taille-normale/protec/2011-09/2011-09-14/201109144e701d6ae62c1-0.jpg" height="240" width="320" /></a></div>
Yes, they sell "french fries".<br />
Bintje is potato variety used for french fries (<a href="http://fr.wikipedia.org/wiki/Madame_Bintje" target="_blank">And have it's own dedicated character</a>).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://plantdepommedeterre.org/img/imgpdt/44.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://plantdepommedeterre.org/img/imgpdt/44.jpg" height="200" width="178" /></a></div>
<br />
Now you clearly understand why this project is called Bintje ... ( Just kidding ... )<br />
<br />
<h4>
Using Bintje
</h4>
First it needs OpenERP / OpenObject backend address, an example setup :
<script src="https://gist.github.com/Electron-libre/bf1d6908036f236b0ba1.js"></script>
Then create a Ruby Class, it could be Rails model if you want :
<script src="https://gist.github.com/Electron-libre/7dd2c0c267c2ec3b929c.js"></script>
This class inherits the CRUD basic methods, and have an example of custom method declaration.
</br >
You first need to include the module, once done your class will inherit module's class methods ( <a href="http://rdoc.info/github/Electron-libre/bintje/OpenObject/ClassMethods" target="_blank">see documentation </a>), and gain the `open_object_model` class variable which is inferred from your ruby object name, but can be overriden as you can see in this gist above.
And now you can query the OpenObject Backend and obtain a BackendResponse Object ( <a href="http://rdoc.info/github/Electron-libre/bintje/OpenObject/BackendResponse" target="_blank">see documentation</a> )
<script src="https://gist.github.com/Electron-libre/3fc842b4e6392d5e9264.js"></script>
Yes it is so simple ...
To get more methods, have a look to the documentation : http://rdoc.info/github/Electron-libre/bintje
The behaviour specifications extracted from Rspec tests : https://github.com/Electron-libre/bintje/wiki
Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com0Nantes, France47.218371 -1.55362100000002147.045877499999996 -1.876344500000021 47.3908645 -1.2308975000000211tag:blogger.com,1999:blog-1437512158510740537.post-23053582450490505412013-12-03T13:53:00.001+01:002013-12-03T13:54:47.495+01:00Accessing AngularJs Scope from your browser console.Times to times, one needs to interact with AngularJs at runtime. ( for debugging purpose ... )<br />
<br />
My Teamates frequently ask me how do I ... check this directive isolated scope structure for example ...<br />
<br />
I think the simple answer is :<br />
<br />
Select the directive's element for inspection in your debugger. In console you can select it using chrome's helper : <a href="https://developers.google.com/chrome-developer-tools/docs/commandline-api#0_-_4" target="_blank">$0 , which is the current selected element</a>.<br />
And then :<br />
<br />
<span style="background-color: white; color: #303942; font-family: 'dejavu sans mono', monospace; font-size: 11px; white-space: pre-wrap;">angular.element($0).scope();</span><br />
<span style="background-color: white; color: #303942; font-family: 'dejavu sans mono', monospace; font-size: 11px; white-space: pre-wrap;"><br /></span>
Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com0Nantes, France47.218371 -1.55362100000002147.045877499999996 -1.876344500000021 47.3908645 -1.2308975000000211tag:blogger.com,1999:blog-1437512158510740537.post-72838921018277545562013-10-16T16:56:00.000+02:002014-06-19T10:43:10.529+02:00Advanced Rails 4 Authorization with Pundit.Here is a good illustration of the underlying power of Voidness...<br />
<br />
<a href="https://github.com/elabs/pundit/" target="_blank">Pundit</a> is a realy simple Ruby Gem, that does nothing more that you could have done yourself. Here is the power !<br />
<br />
When updating to Rails 4 in it's early days, you had no compliant authorization solutions.<br />
Ryan Bates's Cancan was the most used due to it's flexibility and simplicity, but it is not Rails 4 compliant, and brings too much magic for me.<br />
But is there something more flexible and simple than the Void ? ( OK, ... I stop with VoidMadness ... )<br />
<br />
For one of my current job, I started to build a software that needs flexible right management. ( And also a People relations graph, but this is for another post ).<br />
The requirement are :<br />
* Fined grained activities( or action ) access control<br />
* Fields read / write access control<br />
* Flexible Role based system that allow role inheritance<br />
<br />
In this article I'll address only the first requirement, the second will be explained in the next article, while the last one does not need to be since it is obvious.<br />
<br />
<h4>
Let introduce the base models</h4>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRMpNumCH5lKFdKYMOjlU6GOE30wWYlVux9h2TQwL_M1_wypcUk6JosXNGDooFrCNeGRX8Zw0hk8qGNr24vA4esepMXWf8gA4d69k_YMJrB_lTuvxNaEFt6VP8EEikWI6ovqVjXIUBN6s/s1600/user_role_relation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRMpNumCH5lKFdKYMOjlU6GOE30wWYlVux9h2TQwL_M1_wypcUk6JosXNGDooFrCNeGRX8Zw0hk8qGNr24vA4esepMXWf8gA4d69k_YMJrB_lTuvxNaEFt6VP8EEikWI6ovqVjXIUBN6s/s400/user_role_relation.png" height="260" width="400" /></a></div>
It is a basic pattern. I don't need to explain it. User can have many Roles and Role may be filled by many Users.<br />
For each Role, I want to allow some activities. (IE: For accountant : create bill, update payment. For Team Manager : Plan Task for a member of his/her Team )<br />
<br />
<h4>
About <a href="https://github.com/elabs/pundit/" target="_blank">Pundit</a></h4>
<br />
Pundit set some helpers to :<br />
* Check Policy for a given user on a given object( it is not restricted to ActiveRecord::Base instances ).<br />
* Describe Policy in Ruby Class<br />
* Enforce use of Policy in your controllers<br />
* Bring syntactic sugar in you Rspec tests.<br />
<br />
I recommend you to read <a href="https://github.com/elabs/pundit/blob/master/README.md" target="_blank">Pundit's README.md</a> before going further, since I won't explain what is already explained there.<br />
<br />
<h2>
The Activities</h2>
<br />
If found an <a href="http://lostechies.com/derickbailey/2011/05/24/dont-do-role-based-authorization-checks-do-activity-based-checks/" target="_blank">interesting post from Derick Bailey about authorization patterns</a>, putting words on some of my thoughts. Reading this is not required to go further, but I recommend to.<br />
<br />
The activities is not a finite collection. In fact, from my point of view, activities are defined by the following set : All methods directly exposed to user except.<br />
<br />
In the Ruby On Rails world as in many MVC frameworks, this mean all the methods available on controllers. (Authentication Activities is a Subset of this set, that has particularity to be allowed to all users.)<br />
<br />
I do not want to have a collection of activities to maintain. I do not want to reify them through an Postgres table or a flat file.<br />
I want that default behavior is to deny. This behavior should be overridden if you have the appropriate role.<br />
<br />
Since I'am building a REST API, I want to scope each activity on his resource.<br />
<br />
Example:<br />
The Person resource expose through API it's CRUD methods (We will not use HTTP verbs to authorized. I do not find clever to bind Authorization on the Transfer Protocol ).<br />
<br />
I see Person activities as the following set :<br />
<br />
<span style="background-color: #444444; color: #ffe599; font-family: Courier New, Courier, monospace;">person:create</span><br />
<span style="background-color: #444444; color: #ffe599; font-family: Courier New, Courier, monospace;">person:update</span><br />
<span style="background-color: #444444; color: #ffe599; font-family: Courier New, Courier, monospace;">person:delete</span><br />
<span style="background-color: #444444; color: #ffe599; font-family: Courier New, Courier, monospace;">person:show</span><br />
<span style="background-color: #444444; color: #ffe599; font-family: Courier New, Courier, monospace;">person:index</span><br />
<span style="background-color: #444444; color: #ffe599; font-family: Courier New, Courier, monospace;">...</span><br />
<br />
The pattern is dead simple and interpolate as <span style="background-color: #444444; color: #ffe599; font-family: Courier New, Courier, monospace;">#{resource}:#{activity}</span><br />
<br />
With all those postulates, I decided to store activities on Role through the Postgres Array Type. It will be an array of strings.<br />
<br />
<script src="https://gist.github.com/Electron-libre/7007645.js"></script>
<br />
<h2>
Meta-programming Right Management</h2>
<br />
Then I just had to teach Pundit the way I wan't it to authorize activities :<br />
<br />
<script src="https://gist.github.com/Electron-libre/7007807.js"></script>
<br />
This may need some explanations :<br />
This is the ApplicationPolicy, it will be inherited by each resource, allowing to extend/ override Policies by resources.<br />
<br />
I replaced the bulk Pundits question marked CRUD methods with some meta-programming to avoid code duplication, and tedious declarations.<br />
<br />
Line 9 : It recovers allowed activities for the current user.<br />
<br />
Line 13 : The current activity against which we authorize is inferred from the object's class name ( the word record is used but i plan to change this, since record mean database record for me, but it could be any object ).<br />
<br />
Line 17 : The (in)famous Ruby's method missing !<br />
Any unknown method ending with a question mark in the current scope will be interpreted as a check access right for this activity method.<br />
Each time we want to check access right for an activity, it will lookup the allowed activities for the current user roles ...<br />
<br />
This is the way the most of work is done, with a few ruby lines of code.<br />
To manage rights, all we need is to add the activity to user role, what could be more simple ?<br />
<br />
<h4>
The person resource</h4>
<br />
Since all the work is done by the ApplicationPolicy class, the PersonPolicy class is just there to include and override behaviors.<br />
<br />
<h4>
The application Controller</h4>
<br />
Nothing extravagant here. Just read comments. Note that when the right are insufficient, It just return a 403 HTTP Header, it is enough for a REST API and is the way I understand the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2" target="_blank">RFC 2616</a>.<br />
<br />
<h4>
The Rspec Tests. ( Behaviour Driven ? )</h4>
<br />
Just to show how it works and as proof , this is a dumb spec/test for the dumb person example.<br />
<br />
<script src="https://gist.github.com/Electron-libre/7008616.js"></script>
<br />
The test ouput the following :<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuY-gBORjGHWJO9ZggDlAz0NECldF19tXTV-iGLuk0Bka_-c0k6Ogh62JLjxRjZggvWJirKOUqL1kdFbK2lDdScCKHTl3CqgU4ZkwcMJ5M5x9f2rw6JL5EeeTjPyrIVVjfxN9y1nO07hg/s1600/rspec_pundit_output.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuY-gBORjGHWJO9ZggDlAz0NECldF19tXTV-iGLuk0Bka_-c0k6Ogh62JLjxRjZggvWJirKOUqL1kdFbK2lDdScCKHTl3CqgU4ZkwcMJ5M5x9f2rw6JL5EeeTjPyrIVVjfxN9y1nO07hg/s640/rspec_pundit_output.png" height="328" width="640" /></a></div>
<br />
Easy :)<br />
<br />
In a further post i'll detail how to apply read/write mask on object.<br />
<br />
<br />
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com13Nantes, France47.218371 -1.55362100000002147.045877499999996 -1.876344500000021 47.3908645 -1.2308975000000211tag:blogger.com,1999:blog-1437512158510740537.post-22404604198566272082013-08-16T12:26:00.001+02:002013-08-16T12:26:28.358+02:00Holidays Sorry, no geek blog post for a while.<br />
Holidays are dedicated to :<br />
<br />
<ul>
<li>Family </li>
<li>Wakebording </li>
<li>KiteSurfing</li>
<li>Diving and snorkeling </li>
</ul>
<br />
I've found a nice spot,<a href="http://www.tsjwakepark.com/" target="_blank"> a cable wakepark between France and Spain : TSJ Saint Jean Pla de Corts</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://sphotos-a-cdg.xx.fbcdn.net/hphotos-prn2/q77/s720x720/1150418_513041445441756_456292197_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://sphotos-a-cdg.xx.fbcdn.net/hphotos-prn2/q77/s720x720/1150418_513041445441756_456292197_n.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://sphotos-b-cdg.xx.fbcdn.net/hphotos-prn1/q74/s720x720/579635_10151846059428674_90079799_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://sphotos-b-cdg.xx.fbcdn.net/hphotos-prn1/q74/s720x720/579635_10151846059428674_90079799_n.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
The full album is <a href="https://plus.google.com/u/0/photos/108450080611163136255/albums/5912646178707763089" target="_blank">here</a><br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com0tag:blogger.com,1999:blog-1437512158510740537.post-59718295023271176702013-07-31T08:51:00.002+02:002013-07-31T08:51:53.989+02:00Aibrake , Rack , Session_off ...<p>After installing <a href='https://github.com/airbrake/airbrake'>Airbrake</a> gem my collection's request Rspec.specs stoped working as expected.<br />
<br />
I encounterd this error:
<pre>
RuntimeError: can't add a new key into hash during iteration
</pre>
Since Ruby 1.9(.3?) you cant modify Hash within iteration. ( even if they are ordered )
</p>
<p>
After some hours spent in debugger, I found that Airbrake gem Notification class uses <a href='https://github.com/rack/rack'>Rack</a>'s Request @env variable to collect params for Aibrake/Errbit notification.
Nothing weird here, but while collecting params in a loop , the clean_params method hit the racks request's @env with the #cookies method, in order to obtain the cookie hash. <a href='https://gist.github.com/Electron-libre/df5fadc1f69725085ca2'>Code below :</a>
<div class="gistLoad" data-id="df5fadc1f69725085ca2" id="gist-df5fadc1f69725085ca2">Loading ....</div>
I think that this is what misslead <a href='http://www.thoughtbot.com/'>ThoughtBot</a> guys, this method is available form the class Api ( I mean not private ) and returns the cookie Hash, but it also have side effects ... Sadly , it mutates the @env.
I can't say if this is bad design or not, but it looks weird to mee.
</p>
<p>In order to get this working I submitted a <a href='https://github.com/Electron-libre/airbrake/commit/1f2b3d43720f90e63b5eeae70096f8562a230c9d'>fix</a> to Airbrake, not to Rack ...
<br />
Last words, thanks to ThoughBot guys, for all the opensource tools they provide, and reactivity to merge contribs.
</p>
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com0Nantes, France47.218371 -1.55362100000002147.045877499999996 -1.876344500000021 47.3908645 -1.2308975000000211tag:blogger.com,1999:blog-1437512158510740537.post-43480868294369299482013-07-30T12:38:00.001+02:002013-07-30T22:45:01.778+02:00Airbrake gem fails when your rails sessions are disabledIf you experiment <br />
<pre>undefined method `data' for nil:NilClass</pre>
after installing <a href="https://github.com/airbrake/airbrake">Airbrake gem </a> and you have disabled your rails sessions ( for example with the <a href="https://github.com/kares/session_off">session_off gem</a> ) This is because airbrake read the session.data property to send them to the server.
Since you disabled Session's , your controller's session returns nil.
I submitted a fix to airbrake, if you can't wait you can source your aibrake gem from my <a href='https://github.com/Electron-libre/airbrake'>github repository</a>
Edit : My branch has been merged in master, you can now rely on master.
Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com0tag:blogger.com,1999:blog-1437512158510740537.post-57041658631631909182013-07-30T08:52:00.002+02:002013-07-30T08:53:39.107+02:00Le réveil<br />
<br />
Rien n'est plus confus ... d'ou je viens ? Qui suis-je ? Que suis-je?<br />
Ils ont tous une explication, aucune n'est satisfaisante. On m'a donné un nom, que ce soit réellement le mien ou pas je n'ai plus qu'a faire avec.<br />
On ne peut pas en changer, ça fait partie des règles.<br />
"Tu es des nôtres ..."<br />
<br />Anonymoushttp://www.blogger.com/profile/10136197368394465836noreply@blogger.com0